ILIAS  trunk Revision v11.0_alpha-1761-g6dbbfa7b760
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Modules Pages
ILIAS\Tests\Setup\ArrayEnvironmentTest Class Reference
+ Inheritance diagram for ILIAS\Tests\Setup\ArrayEnvironmentTest:
+ Collaboration diagram for ILIAS\Tests\Setup\ArrayEnvironmentTest:

Public Member Functions

 setUp ()
 
 testGetResource ()
 
 testWithResource ()
 
 testSetResourceRejectsDuplicates ()
 
 testConfigFor ()
 
 testDuplicateConfigFor ()
 
 testWrongConfigId ()
 
 testHasConfigFor ()
 

Protected Attributes

Setup ArrayEnvironment $environment
 

Detailed Description

Definition at line 26 of file ArrayEnvironmentTest.php.

Member Function Documentation

◆ setUp()

ILIAS\Tests\Setup\ArrayEnvironmentTest::setUp ( )

Definition at line 30 of file ArrayEnvironmentTest.php.

References ILIAS\UI\examples\Table\Presentation\environment().

30  : void
31  {
32  $this->environment = new Setup\ArrayEnvironment([
33  "foo" => "FOO",
34  "bar" => "BAR"
35  ]);
36  }
+ Here is the call graph for this function:

◆ testConfigFor()

ILIAS\Tests\Setup\ArrayEnvironmentTest::testConfigFor ( )

Definition at line 62 of file ArrayEnvironmentTest.php.

References ILIAS\UI\examples\Table\Presentation\environment().

62  : void
63  {
64  $env = $this->environment->withConfigFor("foo", "BAR");
65  $this->assertEquals("BAR", $env->getConfigFor("foo"));
66  }
+ Here is the call graph for this function:

◆ testDuplicateConfigFor()

ILIAS\Tests\Setup\ArrayEnvironmentTest::testDuplicateConfigFor ( )

Definition at line 68 of file ArrayEnvironmentTest.php.

References ILIAS\UI\examples\Table\Presentation\environment().

68  : void
69  {
70  $this->expectException(\RuntimeException::class);
71  $this->environment
72  ->withConfigFor("foo", "BAR")
73  ->withConfigFor("foo", "BAZ")
74  ;
75  }
+ Here is the call graph for this function:

◆ testGetResource()

ILIAS\Tests\Setup\ArrayEnvironmentTest::testGetResource ( )

Definition at line 38 of file ArrayEnvironmentTest.php.

References ILIAS\UI\examples\Table\Presentation\environment().

38  : void
39  {
40  $this->assertEquals("FOO", $this->environment->getResource("foo"));
41  $this->assertEquals("BAR", $this->environment->getResource("bar"));
42  $this->assertNull($this->environment->getResource("baz"));
43  }
+ Here is the call graph for this function:

◆ testHasConfigFor()

ILIAS\Tests\Setup\ArrayEnvironmentTest::testHasConfigFor ( )

Definition at line 83 of file ArrayEnvironmentTest.php.

References ILIAS\UI\examples\Table\Presentation\environment().

83  : void
84  {
85  $env = $this->environment->withConfigFor("foo", "BAR");
86  $this->assertTrue($env->hasConfigFor("foo"));
87  $this->assertFalse($env->hasConfigFor("bar"));
88  }
+ Here is the call graph for this function:

◆ testSetResourceRejectsDuplicates()

ILIAS\Tests\Setup\ArrayEnvironmentTest::testSetResourceRejectsDuplicates ( )

Definition at line 54 of file ArrayEnvironmentTest.php.

References ILIAS\UI\examples\Table\Presentation\environment().

54  : void
55  {
56  $this->expectException(\RuntimeException::class);
57 
58  $env = $this->environment->withResource("baz", "BAZ");
59  $env->withResource("baz", "BAZ");
60  }
+ Here is the call graph for this function:

◆ testWithResource()

ILIAS\Tests\Setup\ArrayEnvironmentTest::testWithResource ( )

Definition at line 45 of file ArrayEnvironmentTest.php.

References ILIAS\UI\examples\Table\Presentation\environment().

45  : void
46  {
47  $env = $this->environment->withResource("baz", "BAZ");
48 
49  $this->assertEquals("FOO", $env->getResource("foo"));
50  $this->assertEquals("BAR", $env->getResource("bar"));
51  $this->assertEquals("BAZ", $env->getResource("baz"));
52  }
+ Here is the call graph for this function:

◆ testWrongConfigId()

ILIAS\Tests\Setup\ArrayEnvironmentTest::testWrongConfigId ( )

Definition at line 77 of file ArrayEnvironmentTest.php.

References ILIAS\UI\examples\Table\Presentation\environment().

77  : void
78  {
79  $this->expectException(\RuntimeException::class);
80  $this->environment->getConfigFor("foofoo");
81  }
+ Here is the call graph for this function:

Field Documentation

◆ $environment

Setup ArrayEnvironment ILIAS\Tests\Setup\ArrayEnvironmentTest::$environment
protected

Definition at line 28 of file ArrayEnvironmentTest.php.


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