ILIAS  Release_4_4_x_branch Revision 61816
 All Data Structures Namespaces Files Functions Variables Groups Pages
ilTermsOfServiceTableDataProviderFactoryTest Class Reference
+ Inheritance diagram for ilTermsOfServiceTableDataProviderFactoryTest:
+ Collaboration diagram for ilTermsOfServiceTableDataProviderFactoryTest:

Public Member Functions

 setUp ()
 testInstanceCanBeCreated ()
 testExceptionIsRaisedWhenUnsupportedProviderIsRequested (ilTermsOfServiceTableDataProviderFactory $factory)
 testInstanceCanBeCreated
 testFactoryShouldReturnLanguageAdapterWhenLanguageAdapterIsSet (ilTermsOfServiceTableDataProviderFactory $factory)
 testFactoryShouldReturnDatabaseAdapterWhenDatabaseAdapterIsSet (ilTermsOfServiceTableDataProviderFactory $factory)
 testExceptionIsRaisedWhenAgreementByLanguageProviderIsRequestedWithoutCompleteFactoryConfiguration (ilTermsOfServiceTableDataProviderFactory $factory)
 testInstanceCanBeCreated
 testExceptionIsRaisedWhenAcceptanceHistoryProviderIsRequestedWithoutCompleteFactoryConfiguration (ilTermsOfServiceTableDataProviderFactory $factory)
 testInstanceCanBeCreated
 testFactoryShouldReturnAgreementByLanguageProviderWhenRequested (ilTermsOfServiceTableDataProviderFactory $factory)
 testFactoryShouldReturnAcceptanceHistoryProviderWhenRequested (ilTermsOfServiceTableDataProviderFactory $factory)

Protected Attributes

 $backupGlobals = false

Detailed Description

Author
Michael Jansen mjans.nosp@m.en@d.nosp@m.ataba.nosp@m.y.de
Version
$Id$

Definition at line 10 of file ilTermsOfServiceTableDataProviderFactoryTest.php.

Member Function Documentation

ilTermsOfServiceTableDataProviderFactoryTest::setUp ( )

Definition at line 20 of file ilTermsOfServiceTableDataProviderFactoryTest.php.

{
}
ilTermsOfServiceTableDataProviderFactoryTest::testExceptionIsRaisedWhenAcceptanceHistoryProviderIsRequestedWithoutCompleteFactoryConfiguration ( ilTermsOfServiceTableDataProviderFactory  $factory)
ilTermsOfServiceTableDataProviderFactoryTest::testExceptionIsRaisedWhenAgreementByLanguageProviderIsRequestedWithoutCompleteFactoryConfiguration ( ilTermsOfServiceTableDataProviderFactory  $factory)
ilTermsOfServiceTableDataProviderFactoryTest::testExceptionIsRaisedWhenUnsupportedProviderIsRequested ( ilTermsOfServiceTableDataProviderFactory  $factory)

testInstanceCanBeCreated

Parameters
ilTermsOfServiceTableDataProviderFactory$factoryInvalidArgumentException

Definition at line 39 of file ilTermsOfServiceTableDataProviderFactoryTest.php.

References ilTermsOfServiceTableDataProviderFactory\getByContext().

{
$factory->getByContext('PHP unit');
}

+ Here is the call graph for this function:

ilTermsOfServiceTableDataProviderFactoryTest::testFactoryShouldReturnAcceptanceHistoryProviderWhenRequested ( ilTermsOfServiceTableDataProviderFactory  $factory)
Parameters
ilTermsOfServiceTableDataProviderFactory$factorytestInstanceCanBeCreated

Definition at line 102 of file ilTermsOfServiceTableDataProviderFactoryTest.php.

References ilTermsOfServiceTableDataProviderFactory\CONTEXT_ACCEPTANCE_HISTORY, ilTermsOfServiceTableDataProviderFactory\getByContext(), and ilTermsOfServiceTableDataProviderFactory\setDatabaseAdapter().

{
$factory->setDatabaseAdapter($this->getMockBuilder('ilDB')->disableOriginalConstructor()->getMock());
$this->assertInstanceOf('ilTermsOfServiceAcceptanceHistoryProvider', $factory->getByContext(ilTermsOfServiceTableDataProviderFactory::CONTEXT_ACCEPTANCE_HISTORY));
}

+ Here is the call graph for this function:

ilTermsOfServiceTableDataProviderFactoryTest::testFactoryShouldReturnAgreementByLanguageProviderWhenRequested ( ilTermsOfServiceTableDataProviderFactory  $factory)
Parameters
ilTermsOfServiceTableDataProviderFactory$factorytestInstanceCanBeCreated

Definition at line 92 of file ilTermsOfServiceTableDataProviderFactoryTest.php.

References ilTermsOfServiceTableDataProviderFactory\CONTEXT_AGRREMENT_BY_LANGUAGE, ilTermsOfServiceTableDataProviderFactory\getByContext(), and ilTermsOfServiceTableDataProviderFactory\setLanguageAdapter().

{
$factory->setLanguageAdapter($this->getMockBuilder('ilLanguage')->disableOriginalConstructor()->getMock());
$this->assertInstanceOf('ilTermsOfServiceAgreementByLanguageProvider', $factory->getByContext(ilTermsOfServiceTableDataProviderFactory::CONTEXT_AGRREMENT_BY_LANGUAGE));
}

+ Here is the call graph for this function:

ilTermsOfServiceTableDataProviderFactoryTest::testFactoryShouldReturnDatabaseAdapterWhenDatabaseAdapterIsSet ( ilTermsOfServiceTableDataProviderFactory  $factory)
Parameters
ilTermsOfServiceTableDataProviderFactory$factorytestInstanceCanBeCreated

Definition at line 59 of file ilTermsOfServiceTableDataProviderFactoryTest.php.

References ilTermsOfServiceTableDataProviderFactory\getDatabaseAdapter(), and ilTermsOfServiceTableDataProviderFactory\setDatabaseAdapter().

{
$db = $this->getMockBuilder('ilDB')->disableOriginalConstructor()->getMock();
$factory->setDatabaseAdapter($db);
$this->assertEquals($db, $factory->getDatabaseAdapter());
}

+ Here is the call graph for this function:

ilTermsOfServiceTableDataProviderFactoryTest::testFactoryShouldReturnLanguageAdapterWhenLanguageAdapterIsSet ( ilTermsOfServiceTableDataProviderFactory  $factory)
Parameters
ilTermsOfServiceTableDataProviderFactory$factorytestInstanceCanBeCreated

Definition at line 48 of file ilTermsOfServiceTableDataProviderFactoryTest.php.

References $lng, ilTermsOfServiceTableDataProviderFactory\getLanguageAdapter(), and ilTermsOfServiceTableDataProviderFactory\setLanguageAdapter().

{
$lng = $this->getMockBuilder('ilLanguage')->disableOriginalConstructor()->getMock();
$this->assertEquals($lng, $factory->getLanguageAdapter());
}

+ Here is the call graph for this function:

ilTermsOfServiceTableDataProviderFactoryTest::testInstanceCanBeCreated ( )
Returns
ilTermsOfServiceTableDataProviderFactory

Definition at line 27 of file ilTermsOfServiceTableDataProviderFactoryTest.php.

{
$this->assertInstanceOf('ilTermsOfServiceTableDataProviderFactory', $factory);
return $factory;
}

Field Documentation

ilTermsOfServiceTableDataProviderFactoryTest::$backupGlobals = false
protected

The documentation for this class was generated from the following file: