PHP Class ImboUnitTest\Resource\ShortUrlsTest

Inheritance: extends ImboUnitTest\Resource\ResourceTests
Datei anzeigen Open project: imbo/imbo

Public Methods

Method Description
createShortUrlParams ( )
setUp ( ) Set up the resource
tearDown ( ) Tear down the resource
testCanCreateShortUrls ( $extension = null, $queryString = null, array $query = [] )
testCanNotAddShortUrlWhenImageDoesNotExist ( )
testWillAddAModelIfTheEventIsAShortUrlsEvent ( )
testWillGenerateANewIdIfTheGeneratedOneExists ( )
testWillNotAddAModelIfTheEventIsNotAShortUrlsEvent ( )
testWillReturn200OKIfTheShortUrlAlreadyExists ( )
testWillThrowAnExceptionWhenExtensionIsNotRecognized ( )
testWillThrowAnExceptionWhenImageIdentifierDoesNotMatch ( )
testWillThrowAnExceptionWhenImageIdentifierIsMissing ( )
testWillThrowAnExceptionWhenRequestBodyIsEmpty ( )
testWillThrowAnExceptionWhenRequestBodyIsInvalid ( )
testWillThrowAnExceptionWhenUserDoesNotMatch ( )
testWillThrowAnExceptionWhenUserMissing ( )

Protected Methods

Method Description
getNewResource ( )

Method Details

createShortUrlParams() public method

getNewResource() protected method

protected getNewResource ( )

setUp() public method

Set up the resource
public setUp ( )

tearDown() public method

Tear down the resource
public tearDown ( )

testCanCreateShortUrls() public method

public testCanCreateShortUrls ( $extension = null, $queryString = null, array $query = [] )
$query array

testCanNotAddShortUrlWhenImageDoesNotExist() public method

testWillAddAModelIfTheEventIsAShortUrlsEvent() public method

testWillGenerateANewIdIfTheGeneratedOneExists() public method

testWillNotAddAModelIfTheEventIsNotAShortUrlsEvent() public method

testWillReturn200OKIfTheShortUrlAlreadyExists() public method

testWillThrowAnExceptionWhenExtensionIsNotRecognized() public method

testWillThrowAnExceptionWhenImageIdentifierDoesNotMatch() public method

testWillThrowAnExceptionWhenImageIdentifierIsMissing() public method

testWillThrowAnExceptionWhenRequestBodyIsEmpty() public method

testWillThrowAnExceptionWhenRequestBodyIsInvalid() public method

testWillThrowAnExceptionWhenUserDoesNotMatch() public method

testWillThrowAnExceptionWhenUserMissing() public method