PHP Class ImboIntegrationTest\Database\DatabaseTests

Inheritance: extends PHPUnit_Framework_TestCase
Exibir arquivo Open project: imbo/imbo Class Usage Examples

Public Methods

Method Description
getPageAndLimit ( )
getShortUrlVariations ( ) : array[] Data provider
getSortData ( )
setUp ( ) Set up
tearDown ( ) Tear down
testCanCheckIfImageAlreadyExists ( )
testCanDeleteASingleShortUrl ( )
testCanDeleteShortUrls ( )
testCanFilterOnChecksums ( )
testCanFilterOnImageIdentifiers ( )
testCanGetNumberOfBytes ( )
testCanGetNumberOfUsers ( )
testCanGetShortUrlIdThatDoesNotExist ( )
testCanGetStatus ( )
testCanInsertAndGetParametersForAShortUrl ( $shortUrlId, array $query = [], $extension = null )
testCanSortImages ( array $sort = null, $field, array $values )
testDeleteImageThatDoesNotExist ( )
testDeleteMetataFromImageThatDoesNotExist ( )
testGetImageMimeType ( )
testGetImagesAndReturnMetadata ( )
testGetImagesReturnsImagesOnlyForSpecifiedUsers ( )
testGetImagesReturnsImagesWithDateTimeInstances ( )
testGetImagesWithNoQuery ( )
testGetImagesWithPageAndLimit ( $page = null, $limit = null, array $imageIdentifiers )
testGetImagesWithStartAndEndTimestamps ( )
testGetLastModified ( )
testGetLastModifiedOfImageThatDoesNotExist ( )
testGetLastModifiedWhenUserHasNoImages ( )
testGetMetadataWhenImageDoesNotExist ( )
testGetMetadataWhenImageHasNone ( )
testGetMimeTypeWhenImageDoesNotExist ( )
testGetNumImages ( )
testInsertAndGetImage ( )
testLoadImageThatDoesNotExist ( )
testMetadataWithNestedArraysIsRepresetedCorrectly ( )
testMetadataWithNestedArraysIsRepresetedCorrectlyWhenFetchingMultipleImages ( )
testStoreDeleteAndGetImage ( )
testStoreSameImageTwice ( )
testUpdateAndGetMetadata ( )
testUpdateDeleteAndGetMetadata ( )

Protected Methods

Method Description
getAdapter ( ) : Imbo\Database\DatabaseInterface Get the adapter we want to test
getImage ( ) : Image Fetch an image model

Private Methods

Method Description
insertImages ( boolean $alternateUser = false ) : array Insert some images to test the query functionality

Method Details

getAdapter() abstract protected method

Get the adapter we want to test
abstract protected getAdapter ( ) : Imbo\Database\DatabaseInterface
return Imbo\Database\DatabaseInterface

getImage() protected method

Fetch an image model
protected getImage ( ) : Image
return Imbo\Model\Image

getPageAndLimit() public method

public getPageAndLimit ( )

getShortUrlVariations() public method

Data provider
public getShortUrlVariations ( ) : array[]
return array[]

getSortData() public method

public getSortData ( )

setUp() public method

Set up
public setUp ( )

tearDown() public method

Tear down
public tearDown ( )

testCanCheckIfImageAlreadyExists() public method

testCanDeleteASingleShortUrl() public method

testCanDeleteShortUrls() public method

testCanFilterOnChecksums() public method

testCanFilterOnImageIdentifiers() public method

testCanGetNumberOfBytes() public method

testCanGetNumberOfUsers() public method

testCanGetShortUrlIdThatDoesNotExist() public method

testCanGetStatus() public method

public testCanGetStatus ( )

testCanInsertAndGetParametersForAShortUrl() public method

public testCanInsertAndGetParametersForAShortUrl ( $shortUrlId, array $query = [], $extension = null )
$query array

testCanSortImages() public method

public testCanSortImages ( array $sort = null, $field, array $values )
$sort array
$values array

testDeleteImageThatDoesNotExist() public method

testDeleteMetataFromImageThatDoesNotExist() public method

testGetImageMimeType() public method

testGetImagesAndReturnMetadata() public method

testGetImagesReturnsImagesOnlyForSpecifiedUsers() public method

testGetImagesReturnsImagesWithDateTimeInstances() public method

testGetImagesWithNoQuery() public method

testGetImagesWithPageAndLimit() public method

public testGetImagesWithPageAndLimit ( $page = null, $limit = null, array $imageIdentifiers )
$imageIdentifiers array

testGetImagesWithStartAndEndTimestamps() public method

testGetLastModified() public method

public testGetLastModified ( )

testGetLastModifiedOfImageThatDoesNotExist() public method

testGetLastModifiedWhenUserHasNoImages() public method

testGetMetadataWhenImageDoesNotExist() public method

testGetMetadataWhenImageHasNone() public method

testGetMimeTypeWhenImageDoesNotExist() public method

testGetNumImages() public method

public testGetNumImages ( )

testInsertAndGetImage() public method

testLoadImageThatDoesNotExist() public method

testMetadataWithNestedArraysIsRepresetedCorrectly() public method

testMetadataWithNestedArraysIsRepresetedCorrectlyWhenFetchingMultipleImages() public method

testStoreDeleteAndGetImage() public method

testStoreSameImageTwice() public method

testUpdateAndGetMetadata() public method

testUpdateDeleteAndGetMetadata() public method