ILIAS  release_5-3 Revision v5.3.23-19-g915713cf615
ilTermsOfServiceDataGatewayFactoryTest Class Reference
+ Inheritance diagram for ilTermsOfServiceDataGatewayFactoryTest:
+ Collaboration diagram for ilTermsOfServiceDataGatewayFactoryTest:

Public Member Functions

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

Protected Attributes

 $backupGlobals = false
 

Additional Inherited Members

- Protected Member Functions inherited from ilTermsOfServiceBaseTest
 assertException ($exception_class)
 

Detailed Description

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

Definition at line 11 of file ilTermsOfServiceDataGatewayFactoryTest.php.

Member Function Documentation

◆ setUp()

ilTermsOfServiceDataGatewayFactoryTest::setUp ( )

Definition at line 21 of file ilTermsOfServiceDataGatewayFactoryTest.php.

22  {
23  parent::setUp();
24  }

◆ testAcceptanceDatabaseGatewayIsReturnedWhenRequestedByName()

ilTermsOfServiceDataGatewayFactoryTest::testAcceptanceDatabaseGatewayIsReturnedWhenRequestedByName ( )

Definition at line 59 of file ilTermsOfServiceDataGatewayFactoryTest.php.

References $factory.

60  {
62  $factory->setDatabaseAdapter($this->getMockBuilder('ilDBInterface')->getMock());
63  $this->assertInstanceOf('ilTermsOfServiceAcceptanceDatabaseGateway', $factory->getByName('ilTermsOfServiceAcceptanceDatabaseGateway'));
64  }
$factory
Definition: metadata.php:47

◆ testExceptionIsRaisedWhenUnknowDataGatewayIsRequested()

ilTermsOfServiceDataGatewayFactoryTest::testExceptionIsRaisedWhenUnknowDataGatewayIsRequested ( )

InvalidArgumentException

Definition at line 48 of file ilTermsOfServiceDataGatewayFactoryTest.php.

References $factory, and ilTermsOfServiceBaseTest\assertException().

49  {
50  $this->assertException(InvalidArgumentException::class);
52  $factory->setDatabaseAdapter($this->getMockBuilder('ilDBInterface')->getMock());
53  $factory->getByName('PHP Unit');
54  }
$factory
Definition: metadata.php:47
+ Here is the call graph for this function:

◆ testExceptionIsRaisedWhenWhenGatewayIsRequestedWithMissingDependencies()

ilTermsOfServiceDataGatewayFactoryTest::testExceptionIsRaisedWhenWhenGatewayIsRequestedWithMissingDependencies ( )

ilTermsOfServiceMissingDatabaseAdapterException

Definition at line 38 of file ilTermsOfServiceDataGatewayFactoryTest.php.

References $factory, and ilTermsOfServiceBaseTest\assertException().

39  {
40  $this->assertException(ilTermsOfServiceMissingDatabaseAdapterException::class);
42  $factory->getByName('PHP Unit');
43  }
$factory
Definition: metadata.php:47
+ Here is the call graph for this function:

◆ testFactoryShouldReturnDatabaseAdapterWhenDatabaseAdapterIsSet()

ilTermsOfServiceDataGatewayFactoryTest::testFactoryShouldReturnDatabaseAdapterWhenDatabaseAdapterIsSet ( )

Definition at line 69 of file ilTermsOfServiceDataGatewayFactoryTest.php.

References $factory.

70  {
71  $expected = $this->getMockBuilder('ilDBInterface')->getMock();
72 
74  $factory->setDatabaseAdapter($expected);
75  $this->assertEquals($expected, $factory->getDatabaseAdapter());
76  }
$factory
Definition: metadata.php:47

◆ testInstanceCanBeCreated()

ilTermsOfServiceDataGatewayFactoryTest::testInstanceCanBeCreated ( )

Definition at line 29 of file ilTermsOfServiceDataGatewayFactoryTest.php.

References $factory.

30  {
32  $this->assertInstanceOf('ilTermsOfServiceDataGatewayFactory', $factory);
33  }
$factory
Definition: metadata.php:47

Field Documentation

◆ $backupGlobals

ilTermsOfServiceDataGatewayFactoryTest::$backupGlobals = false
protected

Definition at line 16 of file ilTermsOfServiceDataGatewayFactoryTest.php.


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