PHP Class BrowscapTest\Data\DataCollectionTest

Author: James Titcumb ([email protected])
Inheritance: extends PHPUnit_Framework_TestCase
Afficher le fichier Open project: browscap/browscap

Méthodes publiques

Méthode Description
setUp ( ) Sets up the fixture, for example, open a network connection.
testAddDefaultBrowser ( ) checks if the default browser is added sucessfully
testAddDefaultProperties ( ) checks if the default properties are added sucessfully
testAddEnginesFileThrowsExceptionIfFileContainsInvalidJson ( ) tests if a specific exception is thrown in case of error while adding an engine json file
testAddEnginesFileThrowsExceptionIfFileContainsNoData ( )
testAddEnginesFileThrowsExceptionIfFileContainsNoProperties ( )
testAddEnginesFileThrowsExceptionIfFileDoesNotExist ( )
testAddPlatformsFileThrowsExceptionIfFileContainsInvalidJson ( ) tests if a specific exception is thrown in case of error while adding a platform json file
testAddPlatformsFileThrowsExceptionIfFileContainsNoData ( )
testAddPlatformsFileThrowsExceptionIfFileContainsNoMatch ( )
testAddPlatformsFileThrowsExceptionIfFileContainsNoProperties ( )
testAddPlatformsFileThrowsExceptionIfFileDoesNotExist ( )
testAddSourceFileOk ( ) checks if a source file is added successful
testAddSourceFileOkWithLiteAndVersions ( ) checks if a source file is added successful
testAddSourceFileThrowsExceptionIfChildrenAreNotArrays ( ) checks if a exception is thrown if the sortindex property is missing
testAddSourceFileThrowsExceptionIfChildrenDoesNotHaveMatchKeyword ( ) checks if a exception is thrown if the sortindex property is missing
testAddSourceFileThrowsExceptionIfChildrenHasDeviceProperties ( ) checks if a exception is thrown if the sortindex property is missing
testAddSourceFileThrowsExceptionIfChildrenHasEngineProperties ( ) checks if a exception is thrown if the sortindex property is missing
testAddSourceFileThrowsExceptionIfChildrenHasParentProperty ( ) checks if a exception is thrown if the sortindex property is missing
testAddSourceFileThrowsExceptionIfChildrenHasPlatformProperties ( ) checks if a exception is thrown if the sortindex property is missing
testAddSourceFileThrowsExceptionIfChildrenHaveAnInvalidMatchKeyword ( ) checks if a exception is thrown if the sortindex property is missing
testAddSourceFileThrowsExceptionIfChildrenIsNotAnArray ( ) checks if a exception is thrown if the sortindex property is missing
testAddSourceFileThrowsExceptionIfChildrenMatchKeywordHasPlatformPlaceHolderWithoutPlatforms ( ) checks if a exception is thrown if the sortindex property is missing
testAddSourceFileThrowsExceptionIfChildrenMatchKeywordHasVersionPlaceHolderWithoutVersions ( ) checks if a exception is thrown if the sortindex property is missing
testAddSourceFileThrowsExceptionIfChildrenPropertiesAreNotArrays ( ) checks if a exception is thrown if the sortindex property is missing
testAddSourceFileThrowsExceptionIfChildrenPropertyIsNotAnArray ( ) checks if a exception is thrown if the sortindex property is missing
testAddSourceFileThrowsExceptionIfDivisionIsAddedTwice ( ) checks if a exception is thrown if a division is defined twice in the source files
testAddSourceFileThrowsExceptionIfFileContainsInvalidJson ( ) checks if a exception is thrown if the source file had invalid json content
testAddSourceFileThrowsExceptionIfFileDoesNotExist ( )
testAddSourceFileThrowsExceptionIfNameHasInvalidCharsForUseragent ( ) checks if a exception is thrown if the lite property is missing
testAddSourceFileThrowsExceptionIfNoChildrenPropertyIsAvailable ( ) checks if a exception is thrown if the sortindex property is missing
testAddSourceFileThrowsExceptionIfNoCommentPropertyIsAvailable ( ) checks if a exception is thrown if the sortindex property is missing
testAddSourceFileThrowsExceptionIfNoDivisionIsAvailable ( ) checks if a exception is thrown if the sortindex property is missing
testAddSourceFileThrowsExceptionIfNoLitePropertyIsAvailable ( ) checks if a exception is thrown if the lite property is missing
testAddSourceFileThrowsExceptionIfNoNameIsAvailableForUseragent ( ) checks if a exception is thrown if the lite property is missing
testAddSourceFileThrowsExceptionIfNoParentPropertyIsAvailable ( ) checks if a exception is thrown if the sortindex property is missing
testAddSourceFileThrowsExceptionIfNoPropertiesAreAvailable ( ) checks if a exception is thrown if the sortindex property is missing
testAddSourceFileThrowsExceptionIfNoSortIndexIsAvailable ( ) checks if a exception is thrown if the sortindex property is missing
testAddSourceFileThrowsExceptionIfNoStandardPropertyIsAvailable ( ) checks if a exception is thrown if the lite property is missing
testAddSourceFileThrowsExceptionIfNoVersionsAreDefinedButVersionPropertyIsAvailable ( ) checks if a exception is thrown if the sortindex property is missing
testAddSourceFileThrowsExceptionIfNoVersionsAreDefinedWithVersionPlaceholders ( ) checks if a exception is thrown if the sortindex property is missing
testAddSourceFileThrowsExceptionIfParentPropertyIsNotDefaultProperties ( ) checks if a exception is thrown if the sortindex property is missing
testAddSourceFileThrowsExceptionIfPropertiesEntryIsNotAnArray ( ) checks if a exception is thrown if the sortindex property is missing
testAddSourceFileThrowsExceptionIfPropertiesIncludeDeviceData ( ) checks if a exception is thrown if the sortindex property is missing
testAddSourceFileThrowsExceptionIfPropertiesIncludeEngineData ( ) checks if a exception is thrown if the sortindex property is missing
testAddSourceFileThrowsExceptionIfPropertiesIncludePlatformData ( ) checks if a exception is thrown if the sortindex property is missing
testCheckPropertyOk ( ) tests if no error is raised if all went well
testCheckPropertyWithoutDeviceType ( )
testCheckPropertyWithoutIsMobileDevice ( )
testCheckPropertyWithoutIsTablet ( )
testCheckPropertyWithoutParent ( )
testCheckPropertyWithoutVersion ( )
testGetDeviceThrowsExceptionIfDeviceDoesNotExist ( )
testGetEngine ( ) tests getting an existing engine
testGetEngineThrowsExceptionIfEngineDoesNotExist ( )
testGetEngineThrowsExceptionIfPlatformDoesNotExist ( )
testGetGenerationDate ( ) tests getting the generation date
testGetPlatform ( ) tests getting an exiting platform
testGetPlatformThrowsExceptionIfPlatformDoesNotExist ( )
testGetVersion ( ) tests getting the version
testSetGetLogger ( ) tests the setter and the getter for a logger

Private Methods

Méthode Description
getDevicesJsonFixture ( )
getEngineJsonFixture ( )
getPlatformsJsonFixture ( )
getUserAgentFixtures ( )

Method Details

setUp() public méthode

This method is called before a test is executed.
public setUp ( )

testAddDefaultBrowser() public méthode

checks if the default browser is added sucessfully

testAddDefaultProperties() public méthode

checks if the default properties are added sucessfully

testAddEnginesFileThrowsExceptionIfFileContainsInvalidJson() public méthode

tests if a specific exception is thrown in case of error while adding an engine json file

testAddEnginesFileThrowsExceptionIfFileContainsNoData() public méthode

testAddEnginesFileThrowsExceptionIfFileContainsNoProperties() public méthode

testAddEnginesFileThrowsExceptionIfFileDoesNotExist() public méthode

testAddPlatformsFileThrowsExceptionIfFileContainsInvalidJson() public méthode

tests if a specific exception is thrown in case of error while adding a platform json file

testAddPlatformsFileThrowsExceptionIfFileContainsNoData() public méthode

testAddPlatformsFileThrowsExceptionIfFileContainsNoMatch() public méthode

testAddPlatformsFileThrowsExceptionIfFileContainsNoProperties() public méthode

testAddPlatformsFileThrowsExceptionIfFileDoesNotExist() public méthode

testAddSourceFileOk() public méthode

checks if a source file is added successful
public testAddSourceFileOk ( )

testAddSourceFileOkWithLiteAndVersions() public méthode

checks if a source file is added successful

testAddSourceFileThrowsExceptionIfChildrenAreNotArrays() public méthode

checks if a exception is thrown if the sortindex property is missing

testAddSourceFileThrowsExceptionIfChildrenDoesNotHaveMatchKeyword() public méthode

checks if a exception is thrown if the sortindex property is missing

testAddSourceFileThrowsExceptionIfChildrenHasDeviceProperties() public méthode

checks if a exception is thrown if the sortindex property is missing

testAddSourceFileThrowsExceptionIfChildrenHasEngineProperties() public méthode

checks if a exception is thrown if the sortindex property is missing

testAddSourceFileThrowsExceptionIfChildrenHasParentProperty() public méthode

checks if a exception is thrown if the sortindex property is missing

testAddSourceFileThrowsExceptionIfChildrenHasPlatformProperties() public méthode

checks if a exception is thrown if the sortindex property is missing

testAddSourceFileThrowsExceptionIfChildrenHaveAnInvalidMatchKeyword() public méthode

checks if a exception is thrown if the sortindex property is missing

testAddSourceFileThrowsExceptionIfChildrenIsNotAnArray() public méthode

checks if a exception is thrown if the sortindex property is missing

testAddSourceFileThrowsExceptionIfChildrenMatchKeywordHasPlatformPlaceHolderWithoutPlatforms() public méthode

checks if a exception is thrown if the sortindex property is missing

testAddSourceFileThrowsExceptionIfChildrenMatchKeywordHasVersionPlaceHolderWithoutVersions() public méthode

checks if a exception is thrown if the sortindex property is missing

testAddSourceFileThrowsExceptionIfChildrenPropertiesAreNotArrays() public méthode

checks if a exception is thrown if the sortindex property is missing

testAddSourceFileThrowsExceptionIfChildrenPropertyIsNotAnArray() public méthode

checks if a exception is thrown if the sortindex property is missing

testAddSourceFileThrowsExceptionIfDivisionIsAddedTwice() public méthode

checks if a exception is thrown if a division is defined twice in the source files

testAddSourceFileThrowsExceptionIfFileContainsInvalidJson() public méthode

checks if a exception is thrown if the source file had invalid json content

testAddSourceFileThrowsExceptionIfFileDoesNotExist() public méthode

testAddSourceFileThrowsExceptionIfNameHasInvalidCharsForUseragent() public méthode

checks if a exception is thrown if the lite property is missing

testAddSourceFileThrowsExceptionIfNoChildrenPropertyIsAvailable() public méthode

checks if a exception is thrown if the sortindex property is missing

testAddSourceFileThrowsExceptionIfNoCommentPropertyIsAvailable() public méthode

checks if a exception is thrown if the sortindex property is missing

testAddSourceFileThrowsExceptionIfNoDivisionIsAvailable() public méthode

checks if a exception is thrown if the sortindex property is missing

testAddSourceFileThrowsExceptionIfNoLitePropertyIsAvailable() public méthode

checks if a exception is thrown if the lite property is missing

testAddSourceFileThrowsExceptionIfNoNameIsAvailableForUseragent() public méthode

checks if a exception is thrown if the lite property is missing

testAddSourceFileThrowsExceptionIfNoParentPropertyIsAvailable() public méthode

checks if a exception is thrown if the sortindex property is missing

testAddSourceFileThrowsExceptionIfNoPropertiesAreAvailable() public méthode

checks if a exception is thrown if the sortindex property is missing

testAddSourceFileThrowsExceptionIfNoSortIndexIsAvailable() public méthode

checks if a exception is thrown if the sortindex property is missing

testAddSourceFileThrowsExceptionIfNoStandardPropertyIsAvailable() public méthode

checks if a exception is thrown if the lite property is missing

testAddSourceFileThrowsExceptionIfNoVersionsAreDefinedButVersionPropertyIsAvailable() public méthode

checks if a exception is thrown if the sortindex property is missing

testAddSourceFileThrowsExceptionIfNoVersionsAreDefinedWithVersionPlaceholders() public méthode

checks if a exception is thrown if the sortindex property is missing

testAddSourceFileThrowsExceptionIfParentPropertyIsNotDefaultProperties() public méthode

checks if a exception is thrown if the sortindex property is missing

testAddSourceFileThrowsExceptionIfPropertiesEntryIsNotAnArray() public méthode

checks if a exception is thrown if the sortindex property is missing

testAddSourceFileThrowsExceptionIfPropertiesIncludeDeviceData() public méthode

checks if a exception is thrown if the sortindex property is missing

testAddSourceFileThrowsExceptionIfPropertiesIncludeEngineData() public méthode

checks if a exception is thrown if the sortindex property is missing

testAddSourceFileThrowsExceptionIfPropertiesIncludePlatformData() public méthode

checks if a exception is thrown if the sortindex property is missing

testCheckPropertyOk() public méthode

tests if no error is raised if all went well
public testCheckPropertyOk ( )

testCheckPropertyWithoutDeviceType() public méthode

testCheckPropertyWithoutIsMobileDevice() public méthode

testCheckPropertyWithoutIsTablet() public méthode

testCheckPropertyWithoutParent() public méthode

testCheckPropertyWithoutVersion() public méthode

testGetDeviceThrowsExceptionIfDeviceDoesNotExist() public méthode

testGetEngine() public méthode

tests getting an existing engine
public testGetEngine ( )

testGetEngineThrowsExceptionIfEngineDoesNotExist() public méthode

testGetEngineThrowsExceptionIfPlatformDoesNotExist() public méthode

testGetGenerationDate() public méthode

tests getting the generation date

testGetPlatform() public méthode

tests getting an exiting platform
public testGetPlatform ( )

testGetPlatformThrowsExceptionIfPlatformDoesNotExist() public méthode

testGetVersion() public méthode

tests getting the version
public testGetVersion ( )

testSetGetLogger() public méthode

tests the setter and the getter for a logger
public testSetGetLogger ( )