ILIAS  trunk Revision v11.0_alpha-1866-gfa368f7776e
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Modules Pages
ILIAS\LegalDocuments\test\ConfigTest Class Reference
+ Inheritance diagram for ILIAS\LegalDocuments\test\ConfigTest:
+ Collaboration diagram for ILIAS\LegalDocuments\test\ConfigTest:

Public Member Functions

 testConstruct ()
 
 testEditable ()
 
 testAllowEditing ()
 
 testEditableLegalDocuments ()
 
 testNonEditableLegalDocuments ()
 

Detailed Description

Definition at line 29 of file ConfigTest.php.

Member Function Documentation

◆ testAllowEditing()

ILIAS\LegalDocuments\test\ConfigTest::testAllowEditing ( )

Definition at line 44 of file ConfigTest.php.

44  : void
45  {
46  $this->assertTrue((new Config($this->mock(Provide::class)))->allowEditing()->editable());
47  }

◆ testConstruct()

ILIAS\LegalDocuments\test\ConfigTest::testConstruct ( )

Definition at line 33 of file ConfigTest.php.

33  : void
34  {
35  $this->assertInstanceOf(Config::class, new Config($this->mock(Provide::class)));
36  }

◆ testEditable()

ILIAS\LegalDocuments\test\ConfigTest::testEditable ( )

Definition at line 38 of file ConfigTest.php.

38  : void
39  {
40  $this->assertFalse((new Config($this->mock(Provide::class)))->editable());
41  $this->assertTrue((new Config($this->mock(Provide::class), true))->editable());
42  }

◆ testEditableLegalDocuments()

ILIAS\LegalDocuments\test\ConfigTest::testEditableLegalDocuments ( )

Definition at line 49 of file ConfigTest.php.

49  : void
50  {
51  $readonly = $this->mock(Provide::class);
52  $provide = $this->mockMethod(Provide::class, 'allowEditing', [], $readonly);
53  $this->assertSame($readonly, (new Config($provide))->allowEditing()->legalDocuments());
54  }

◆ testNonEditableLegalDocuments()

ILIAS\LegalDocuments\test\ConfigTest::testNonEditableLegalDocuments ( )

Definition at line 56 of file ConfigTest.php.

56  : void
57  {
58  $provide = $this->mockMethod(Provide::class, 'allowEditing', [], $this->mock(Provide::class), self::never());
59  $this->assertSame($provide, (new Config($provide))->legalDocuments());
60  }

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