Total Complexity | 1 |
Total Lines | 16 |
Duplicated Lines | 0 % |
Changes | 2 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
15 | class ParentTest extends CommonTestClass |
||
16 | { |
||
17 | public function testSimple() |
||
18 | { |
||
19 | $data = new CurrentChild(); |
||
20 | $this->assertEmpty($data->getParent()); |
||
21 | $this->assertEmpty($data->count()); |
||
22 | $data->setParent(new ParentElement()); |
||
23 | $this->assertEquals(0, $data->getParent()->count()); |
||
24 | $this->assertInstanceOf('\kalanis\kw_templates\AHtmlElement', $data); |
||
25 | $data->append(new AnotherChild()); |
||
26 | $this->assertEmpty($data->count()); |
||
27 | $this->assertNotEquals(0, $data->getParent()->count()); |
||
28 | $this->assertInstanceOf('\BasicTests\AnotherChild', $data->getParent()->lastChild()); |
||
29 | $data->setParent(null); |
||
30 | $this->assertEmpty($data->getParent()); |
||
31 | } |
||
48 |