PHP Класс BrowscapTest\Data\DataCollectionTest

Автор: James Titcumb ([email protected])
Наследование: extends PHPUnit_Framework_TestCase
Показать файл Открыть проект

Открытые методы

Метод Описание
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

Приватные методы

Метод Описание
getDevicesJsonFixture ( )
getEngineJsonFixture ( )
getPlatformsJsonFixture ( )
getUserAgentFixtures ( )

Описание методов

setUp() публичный Метод

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

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
public testAddSourceFileOk ( )

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
public testCheckPropertyOk ( )

testCheckPropertyWithoutDeviceType() публичный Метод

testCheckPropertyWithoutIsMobileDevice() публичный Метод

testCheckPropertyWithoutIsTablet() публичный Метод

testCheckPropertyWithoutParent() публичный Метод

testCheckPropertyWithoutVersion() публичный Метод

testGetDeviceThrowsExceptionIfDeviceDoesNotExist() публичный Метод

testGetEngine() публичный Метод

tests getting an existing engine
public testGetEngine ( )

testGetEngineThrowsExceptionIfEngineDoesNotExist() публичный Метод

testGetEngineThrowsExceptionIfPlatformDoesNotExist() публичный Метод

testGetGenerationDate() публичный Метод

tests getting the generation date

testGetPlatform() публичный Метод

tests getting an exiting platform
public testGetPlatform ( )

testGetPlatformThrowsExceptionIfPlatformDoesNotExist() публичный Метод

testGetVersion() публичный Метод

tests getting the version
public testGetVersion ( )

testSetGetLogger() публичный Метод

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