ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
ilTermsOfServiceEntityFactoryTest.php
Go to the documentation of this file.
1<?php
2/* Copyright (c) 1998-2018 ILIAS open source, Extended GPL, see docs/LICENSE */
3
9{
13 public function testInstanceCanBeCreated()
14 {
15 $factory = new \ilTermsOfServiceEntityFactory();
16
17 $this->assertInstanceOf('ilTermsOfServiceEntityFactory', $factory);
18 }
19
24 {
25 $this->assertException(\InvalidArgumentException::class);
26
27 $factory = new \ilTermsOfServiceEntityFactory();
28 $factory->getByName('PHP Unit');
29 }
30
35 {
36 $factory = new \ilTermsOfServiceEntityFactory();
37
38 $this->assertInstanceOf(
39 'ilTermsOfServiceAcceptanceEntity',
40 $factory->getByName('ilTermsOfServiceAcceptanceEntity')
41 );
42 }
43}
$factory
Definition: metadata.php:43
An exception for terminatinating execution or to throw for unit testing.
Class ilTermsOfServiceBaseTest.
assertException(string $exceptionClass)
Class ilTermsOfServiceEntityFactoryTest.
testExceptionIsRaisedWhenUnknownEntityIsRequested()
@expectedException \InvalidArgumentException