DatabaseTest
extends TestCase
in package
"Database" URL shortener test.
Tags
Table of Contents
- getShortener() : Database
- Get the object to test.
- testResolution() : void
- Test that resolve is supported.
- testResolutionOfBadInput() : void
- Test that resolve errors correctly when given bad input
- testShortener() : void
- Test that the shortener works correctly under "happy path."
- testShortenerLegacy() : void
- Test that the shortener works correctly with legacy hashing.
Methods
getShortener()
Get the object to test.
public
getShortener(ShortlinksServiceInterface $service[, string $algorithm = 'md5' ]) : Database
Parameters
- $service : ShortlinksServiceInterface
-
Database service object/mock
- $algorithm : string = 'md5'
-
Hashing algorithm
Return values
Database —testResolution()
Test that resolve is supported.
public
testResolution() : void
Tags
Return values
void —testResolutionOfBadInput()
Test that resolve errors correctly when given bad input
public
testResolutionOfBadInput() : void
Tags
Return values
void —testShortener()
Test that the shortener works correctly under "happy path."
public
testShortener() : void
Tags
Return values
void —testShortenerLegacy()
Test that the shortener works correctly with legacy hashing.
public
testShortenerLegacy() : void