15        $factory = new \ilTermsOfServiceTableDataProviderFactory();
 
   16        $factory->setDatabaseAdapter($this->getMockBuilder(\ilDBInterface::class)->getMock());
 
   18        $this->assertInstanceOf(
'ilTermsOfServiceTableDataProviderFactory', 
$factory);
 
   44        $db = $this->getMockBuilder(\ilDBInterface::class)->getMock();
 
   47        $this->assertEquals($db, 
$factory->getDatabaseAdapter());
 
   58        $this->
assertException(\ilTermsOfServiceMissingDatabaseAdapterException::class);
 
   72        $factory->setDatabaseAdapter($this->getMockBuilder(\ilDBInterface::class)->getMock());
 
   74        $this->assertInstanceOf(
 
   75            'ilTermsOfServiceAcceptanceHistoryProvider',
 
An exception for terminatinating execution or to throw for unit testing.
Class ilTermsOfServiceBaseTest.
assertException(string $exceptionClass)
Class ilTermsOfServiceTableDataProviderFactoryTest.
testExceptionIsRaisedWhenUnsupportedProviderIsRequested(\ilTermsOfServiceTableDataProviderFactory $factory)
@depends testInstanceCanBeCreated
testExceptionIsRaisedWhenAcceptanceHistoryProviderIsRequestedWithoutCompleteFactoryConfiguration(\ilTermsOfServiceTableDataProviderFactory $factory)
@depends testInstanceCanBeCreated
testFactoryShouldReturnAcceptanceHistoryProviderWhenRequested(\ilTermsOfServiceTableDataProviderFactory $factory)
testFactoryShouldReturnDatabaseAdapterWhenDatabaseAdapterIsSet(\ilTermsOfServiceTableDataProviderFactory $factory)
testInstanceCanBeCreated()
Class ilTermsOfServiceTableDataProviderFactory.
const CONTEXT_ACCEPTANCE_HISTORY