ILIAS
release_5-3 Revision v5.3.23-19-g915713cf615
◀ ilDoc Overview
ilTermsOfServiceEntityFactoryTest.php
Go to the documentation of this file.
1
<?php
2
/* Copyright (c) 1998-2012 ILIAS open source, Extended GPL, see docs/LICENSE */
3
4
require_once
'Services/TermsOfService/classes/class.ilTermsOfServiceEntityFactory.php'
;
5
require_once
'Services/TermsOfService/classes/class.ilTermsOfServiceDataGatewayFactory.php'
;
6
require_once
'Services/TermsOfService/test/ilTermsOfServiceBaseTest.php'
;
7
12
class
ilTermsOfServiceEntityFactoryTest
extends
ilTermsOfServiceBaseTest
13
{
17
protected
$backupGlobals
=
false
;
18
22
public
function
setUp
()
23
{
24
parent::setUp();
25
}
26
30
public
function
testInstanceCanBeCreated
()
31
{
32
$factory
=
new
ilTermsOfServiceEntityFactory
();
33
$this->assertInstanceOf(
'ilTermsOfServiceEntityFactory'
,
$factory
);
34
}
35
39
public
function
testExceptionIsRaisedWhenUnknowEntityIsRequested
()
40
{
41
$this->
assertException
(InvalidArgumentException::class);
42
$factory
=
new
ilTermsOfServiceEntityFactory
();
43
$factory
->getByName(
'PHP Unit'
);
44
}
45
49
public
function
testAcceptanceEntityIsReturnedWhenRequestedByName
()
50
{
51
$factory
=
new
ilTermsOfServiceEntityFactory
();
52
$this->assertInstanceOf(
'ilTermsOfServiceAcceptanceEntity'
,
$factory
->getByName(
'ilTermsOfServiceAcceptanceEntity'
));
53
}
54
}
ilTermsOfServiceEntityFactoryTest\setUp
setUp()
Definition:
ilTermsOfServiceEntityFactoryTest.php:22
ilTermsOfServiceEntityFactory
Definition:
class.ilTermsOfServiceEntityFactory.php:8
ilTermsOfServiceEntityFactoryTest\testAcceptanceEntityIsReturnedWhenRequestedByName
testAcceptanceEntityIsReturnedWhenRequestedByName()
Definition:
ilTermsOfServiceEntityFactoryTest.php:49
$factory
$factory
Definition:
metadata.php:47
ilTermsOfServiceEntityFactoryTest
Definition:
ilTermsOfServiceEntityFactoryTest.php:12
ilTermsOfServiceBaseTest\assertException
assertException($exception_class)
Definition:
ilTermsOfServiceBaseTest.php:13
ilTermsOfServiceEntityFactoryTest\$backupGlobals
$backupGlobals
Definition:
ilTermsOfServiceEntityFactoryTest.php:17
ilTermsOfServiceBaseTest
Definition:
ilTermsOfServiceBaseTest.php:8
ilTermsOfServiceEntityFactoryTest\testExceptionIsRaisedWhenUnknowEntityIsRequested
testExceptionIsRaisedWhenUnknowEntityIsRequested()
InvalidArgumentException
Definition:
ilTermsOfServiceEntityFactoryTest.php:39
ilTermsOfServiceEntityFactoryTest\testInstanceCanBeCreated
testInstanceCanBeCreated()
Definition:
ilTermsOfServiceEntityFactoryTest.php:30
Services
TermsOfService
test
factories
ilTermsOfServiceEntityFactoryTest.php
Generated on Tue Jan 28 2025 19:01:41 for ILIAS by
1.8.13 (using
Doxyfile
)