ILIAS  release_5-3 Revision v5.3.23-19-g915713cf615
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
4require_once 'Services/TermsOfService/classes/class.ilTermsOfServiceEntityFactory.php';
5require_once 'Services/TermsOfService/classes/class.ilTermsOfServiceDataGatewayFactory.php';
6require_once 'Services/TermsOfService/test/ilTermsOfServiceBaseTest.php';
7
13{
17 protected $backupGlobals = false;
18
22 public function setUp()
23 {
24 parent::setUp();
25 }
26
30 public function testInstanceCanBeCreated()
31 {
33 $this->assertInstanceOf('ilTermsOfServiceEntityFactory', $factory);
34 }
35
40 {
41 $this->assertException(InvalidArgumentException::class);
43 $factory->getByName('PHP Unit');
44 }
45
50 {
52 $this->assertInstanceOf('ilTermsOfServiceAcceptanceEntity', $factory->getByName('ilTermsOfServiceAcceptanceEntity'));
53 }
54}
$factory
Definition: metadata.php:47
An exception for terminatinating execution or to throw for unit testing.
testExceptionIsRaisedWhenUnknowEntityIsRequested()
@expectedException InvalidArgumentException