| @@ 28-37 (lines=10) @@ | ||
| 25 | class AppendagesTest extends Helpers |
|
| 26 | { |
|
| 27 | ||
| 28 | public function testBasic() |
|
| 29 | { |
|
| 30 | $doc = new hemio\html\Document(new hemio\html\Str('')); |
|
| 31 | $doc->addInheritableAppendage('axkdw_sda2', '-lsk3jfl#1-'); |
|
| 32 | $div = new \hemio\html\Div; |
|
| 33 | $doc->getHtml()->getBody()->addChild($div); |
|
| 34 | ||
| 35 | $this->assertEquals('-lsk3jfl#1-', |
|
| 36 | $div->getInheritableAppendage('axkdw_sda2')); |
|
| 37 | } |
|
| 38 | ||
| 39 | public function testLateAdded() |
|
| 40 | { |
|
| @@ 39-48 (lines=10) @@ | ||
| 36 | $div->getInheritableAppendage('axkdw_sda2')); |
|
| 37 | } |
|
| 38 | ||
| 39 | public function testLateAdded() |
|
| 40 | { |
|
| 41 | $doc = new hemio\html\Document(new hemio\html\Str('')); |
|
| 42 | $div = new \hemio\html\Div; |
|
| 43 | $doc->getHtml()->getBody()->addChild($div); |
|
| 44 | $doc->addInheritableAppendage('axkdw_sda2', '-lsk3jfl#1-'); |
|
| 45 | ||
| 46 | $this->assertEquals('-lsk3jfl#1-', |
|
| 47 | $div->getInheritableAppendage('axkdw_sda2')); |
|
| 48 | } |
|
| 49 | ||
| 50 | public function testBasicExisting() |
|
| 51 | { |
|
| @@ 50-60 (lines=11) @@ | ||
| 47 | $div->getInheritableAppendage('axkdw_sda2')); |
|
| 48 | } |
|
| 49 | ||
| 50 | public function testBasicExisting() |
|
| 51 | { |
|
| 52 | $doc = new hemio\html\Document(new hemio\html\Str('')); |
|
| 53 | $doc->addInheritableAppendage('key', 'overwritten-value'); |
|
| 54 | $div = new \hemio\html\Div; |
|
| 55 | $div->addInheritableAppendage('key', 'existing-value'); |
|
| 56 | $doc->getHtml()->getBody()->addChild($div); |
|
| 57 | ||
| 58 | $this->assertEquals('existing-value', |
|
| 59 | $div->getInheritableAppendage('key')); |
|
| 60 | } |
|
| 61 | ||
| 62 | public function testLateAddedExisting() |
|
| 63 | { |
|
| @@ 62-72 (lines=11) @@ | ||
| 59 | $div->getInheritableAppendage('key')); |
|
| 60 | } |
|
| 61 | ||
| 62 | public function testLateAddedExisting() |
|
| 63 | { |
|
| 64 | $doc = new hemio\html\Document(new hemio\html\Str('')); |
|
| 65 | $div = new \hemio\html\Div; |
|
| 66 | $div->addInheritableAppendage('key', 'existing-value'); |
|
| 67 | $doc->getHtml()->getBody()->addChild($div); |
|
| 68 | $doc->addInheritableAppendage('key', 'overwritten-value'); |
|
| 69 | ||
| 70 | $this->assertEquals('existing-value', |
|
| 71 | $div->getInheritableAppendage('key')); |
|
| 72 | } |
|
| 73 | } |
|
| 74 | ||