4 require_once
'Services/TermsOfService/classes/class.ilTermsOfServiceTableDataProviderFactory.php';
5 require_once
'Services/TermsOfService/test/ilTermsOfServiceBaseTest.php';
24 define(
'CLIENT_ID',
'phpunit');
36 $this->assertInstanceOf(
'ilTermsOfServiceTableDataProviderFactory',
$factory);
37 $factory->setDatabaseAdapter($this->getMockBuilder(
'ilDBInterface')->getMock());
38 $factory->setLanguageAdapter($this->getMockBuilder(
'ilLanguage')->setMethods(
array(
'toJSON',
'getInstalledLanguages',
'getLangKey',
'getDefaultLanguage'))->disableOriginalConstructor()->getMock());
59 $lng = $this->getMockBuilder(
'ilLanguage')->setMethods(
array(
'toJSON',
'getInstalledLanguages'))->disableOriginalConstructor()->getMock();
70 $db = $this->getMockBuilder(
'ilDBInterface')->getMock();
82 $this->
assertException(ilTermsOfServiceMissingLanguageAdapterException::class);
94 $this->
assertException(ilTermsOfServiceMissingDatabaseAdapterException::class);
105 $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'