4 require_once
'Services/TermsOfService/classes/class.ilTermsOfServiceTableDataProviderFactory.php';
5 require_once
'Services/TermsOfService/test/ilTermsOfServiceBaseTest.php';
25 define(
'CLIENT_ID',
'phpunit');
37 $this->assertInstanceOf(
'ilTermsOfServiceTableDataProviderFactory', $factory);
38 $factory->setDatabaseAdapter($this->getMockBuilder(
'ilDBInterface')->getMock());
39 $factory->setLanguageAdapter($this->getMockBuilder(
'ilLanguage')->setMethods(
array(
'toJSON',
'getInstalledLanguages',
'getLangKey',
'getDefaultLanguage'))->disableOriginalConstructor()->getMock());
60 $lng = $this->getMockBuilder(
'ilLanguage')->setMethods(
array(
'toJSON',
'getInstalledLanguages'))->disableOriginalConstructor()->getMock();
71 $db = $this->getMockBuilder(
'ilDBInterface')->getMock();
83 $this->
assertException(ilTermsOfServiceMissingLanguageAdapterException::class);
95 $this->
assertException(ilTermsOfServiceMissingDatabaseAdapterException::class);
106 $factory->
setLanguageAdapter($this->getMockBuilder(
'ilLanguage')->setMethods(
array(
'toJSON',
'getInstalledLanguages'))->disableOriginalConstructor()->getMock());
const CONTEXT_ACCEPTANCE_HISTORY
testExceptionIsRaisedWhenAgreementByLanguageProviderIsRequestedWithoutCompleteFactoryConfiguration(ilTermsOfServiceTableDataProviderFactory $factory)
testInstanceCanBeCreated
testFactoryShouldReturnLanguageAdapterWhenLanguageAdapterIsSet(ilTermsOfServiceTableDataProviderFactory $factory)
const CONTEXT_AGRREMENT_BY_LANGUAGE
assertException($exception_class)
testExceptionIsRaisedWhenAcceptanceHistoryProviderIsRequestedWithoutCompleteFactoryConfiguration(ilTermsOfServiceTableDataProviderFactory $factory)
testInstanceCanBeCreated
testInstanceCanBeCreated()
Create styles array
The data for the language used.
testFactoryShouldReturnAcceptanceHistoryProviderWhenRequested(ilTermsOfServiceTableDataProviderFactory $factory)
testExceptionIsRaisedWhenUnsupportedProviderIsRequested(ilTermsOfServiceTableDataProviderFactory $factory)
testInstanceCanBeCreated
testFactoryShouldReturnAgreementByLanguageProviderWhenRequested(ilTermsOfServiceTableDataProviderFactory $factory)
testFactoryShouldReturnDatabaseAdapterWhenDatabaseAdapterIsSet(ilTermsOfServiceTableDataProviderFactory $factory)
defined( 'APPLICATION_ENV')||define( 'APPLICATION_ENV'