ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
KeyValueInterruptiveItemTest Class Reference
+ Inheritance diagram for KeyValueInterruptiveItemTest:
+ Collaboration diagram for KeyValueInterruptiveItemTest:

Public Member Functions

 setUp ()
 
 testGetKey ()
 
 testGetValue ()
 
 testRender ()
 

Protected Member Functions

 getItem ()
 

Private Attributes

string $id
 
string $key
 
string $value
 

Detailed Description

Definition at line 28 of file KeyValueInterruptiveItemTest.php.

Member Function Documentation

◆ getItem()

KeyValueInterruptiveItemTest::getItem ( )
protected

Definition at line 41 of file KeyValueInterruptiveItemTest.php.

41 : KeyValue
42 {
43 return new KeyValue(
44 $this->id,
45 $this->key,
46 $this->value
47 );
48 }

Referenced by testGetKey(), testGetValue(), and testRender().

+ Here is the caller graph for this function:

◆ setUp()

KeyValueInterruptiveItemTest::setUp ( )

Definition at line 34 of file KeyValueInterruptiveItemTest.php.

34 : void
35 {
36 $this->id = 'id';
37 $this->key = 'key';
38 $this->value = 'value';
39 }

◆ testGetKey()

KeyValueInterruptiveItemTest::testGetKey ( )

Definition at line 50 of file KeyValueInterruptiveItemTest.php.

50 : void
51 {
52 $item = $this->getItem();
53 $this->assertEquals($this->key, $item->getKey());
54 }

References getItem().

+ Here is the call graph for this function:

◆ testGetValue()

KeyValueInterruptiveItemTest::testGetValue ( )

Definition at line 56 of file KeyValueInterruptiveItemTest.php.

56 : void
57 {
58 $item = $this->getItem();
59 $this->assertEquals($this->value, $item->getValue());
60 }

References getItem().

+ Here is the call graph for this function:

◆ testRender()

KeyValueInterruptiveItemTest::testRender ( )

Definition at line 62 of file KeyValueInterruptiveItemTest.php.

62 : void
63 {
64 $r = $this->getDefaultRenderer();
65 $html = $r->render($this->getItem());
66
67 $expected = <<<EOT
68<div class="c-modal--interruptive__items__key-value">
69 <dt class="c-modal--interruptive__items__key-value__key">
70 key <input type="hidden" name="interruptive_items[]" value="id">
71 </dt>
72 <dd class="c-modal--interruptive__items__key-value__value">
73 value
74 </dd>
75</div>
76EOT;
77
78 $this->assertEquals(
79 $this->brutallyTrimHTML($expected),
80 $this->brutallyTrimHTML($html)
81 );
82 }

References getItem().

+ Here is the call graph for this function:

Field Documentation

◆ $id

string KeyValueInterruptiveItemTest::$id
private

Definition at line 30 of file KeyValueInterruptiveItemTest.php.

◆ $key

string KeyValueInterruptiveItemTest::$key
private

Definition at line 31 of file KeyValueInterruptiveItemTest.php.

◆ $value

string KeyValueInterruptiveItemTest::$value
private

Definition at line 32 of file KeyValueInterruptiveItemTest.php.


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