ILIAS  release_5-0 Revision 5.0.0-1144-gc4397b1f870
ilTermsOfServiceDataGatewayFactoryTest Class Reference
+ Inheritance diagram for ilTermsOfServiceDataGatewayFactoryTest:
+ Collaboration diagram for ilTermsOfServiceDataGatewayFactoryTest:

Public Member Functions

 setUp ()
 
 testInstanceCanBeCreated ()
 
 testExceptionIsRaisedWhenWhenGatewayIsRequestedWithMissingDependencies ()
 @expectedException ilTermsOfServiceMissingDatabaseAdapterException More...
 
 testExceptionIsRaisedWhenUnknowDataGatewayIsRequested ()
 @expectedException InvalidArgumentException More...
 
 testAcceptanceDatabaseGatewayIsReturnedWhenRequestedByName ()
 
 testFactoryShouldReturnDatabaseAdapterWhenDatabaseAdapterIsSet ()
 

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 ilTermsOfServiceDataGatewayFactoryTest.php.

Member Function Documentation

◆ setUp()

ilTermsOfServiceDataGatewayFactoryTest::setUp ( )

Definition at line 20 of file ilTermsOfServiceDataGatewayFactoryTest.php.

21 {
22 }

◆ testAcceptanceDatabaseGatewayIsReturnedWhenRequestedByName()

ilTermsOfServiceDataGatewayFactoryTest::testAcceptanceDatabaseGatewayIsReturnedWhenRequestedByName ( )

Definition at line 55 of file ilTermsOfServiceDataGatewayFactoryTest.php.

56 {
58 $factory->setDatabaseAdapter($this->getMockBuilder('ilDB')->disableOriginalConstructor()->getMock());
59 $this->assertInstanceOf('ilTermsOfServiceAcceptanceDatabaseGateway', $factory->getByName('ilTermsOfServiceAcceptanceDatabaseGateway'));
60 }

◆ testExceptionIsRaisedWhenUnknowDataGatewayIsRequested()

ilTermsOfServiceDataGatewayFactoryTest::testExceptionIsRaisedWhenUnknowDataGatewayIsRequested ( )

@expectedException InvalidArgumentException

Definition at line 45 of file ilTermsOfServiceDataGatewayFactoryTest.php.

46 {
48 $factory->setDatabaseAdapter($this->getMockBuilder('ilDB')->disableOriginalConstructor()->getMock());
49 $factory->getByName('PHP Unit');
50 }

◆ testExceptionIsRaisedWhenWhenGatewayIsRequestedWithMissingDependencies()

ilTermsOfServiceDataGatewayFactoryTest::testExceptionIsRaisedWhenWhenGatewayIsRequestedWithMissingDependencies ( )

@expectedException ilTermsOfServiceMissingDatabaseAdapterException

Definition at line 36 of file ilTermsOfServiceDataGatewayFactoryTest.php.

37 {
39 $factory->getByName('PHP Unit');
40 }

◆ testFactoryShouldReturnDatabaseAdapterWhenDatabaseAdapterIsSet()

ilTermsOfServiceDataGatewayFactoryTest::testFactoryShouldReturnDatabaseAdapterWhenDatabaseAdapterIsSet ( )

Definition at line 65 of file ilTermsOfServiceDataGatewayFactoryTest.php.

66 {
67 $expected = $this->getMockBuilder('ilDB')->disableOriginalConstructor()->getMock();
68
70 $factory->setDatabaseAdapter($expected);
71 $this->assertEquals($expected, $factory->getDatabaseAdapter());
72 }

◆ testInstanceCanBeCreated()

ilTermsOfServiceDataGatewayFactoryTest::testInstanceCanBeCreated ( )

Definition at line 27 of file ilTermsOfServiceDataGatewayFactoryTest.php.

28 {
30 $this->assertInstanceOf('ilTermsOfServiceDataGatewayFactory', $factory);
31 }

Field Documentation

◆ $backupGlobals

ilTermsOfServiceDataGatewayFactoryTest::$backupGlobals = false
protected

Definition at line 15 of file ilTermsOfServiceDataGatewayFactoryTest.php.


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