| Conditions | 1 |
| Paths | 1 |
| Total Lines | 20 |
| Code Lines | 13 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 12 | public function testClone() |
||
| 13 | { |
||
| 14 | $xml = new Person('Alex', 'Letnikow', [ |
||
| 15 | new Head('big', 'strong', [ |
||
| 16 | new XmlConvertibleObject('Test', [ |
||
| 17 | new XmlConvertibleObject('undefined'), |
||
| 18 | ]) |
||
| 19 | ]) |
||
| 20 | ]); |
||
| 21 | |||
| 22 | $cloned = clone $xml; |
||
| 23 | $xml->name = 'Roman'; |
||
| 24 | $this->assertNotEquals($xml->name, $cloned->name); |
||
| 25 | $xml->xmlChildren[0]->xmlChildren[0]->xmlChildren[0]->{'a'} = 1; |
||
| 26 | $cloned->xmlChildren[0]->xmlChildren[0]->xmlChildren[0]->{'a'} = 2; |
||
| 27 | $this->assertNotEquals( |
||
| 28 | $xml->xmlChildren[0]->xmlChildren[0]->xmlChildren[0]->{'a'}, |
||
| 29 | $cloned->xmlChildren[0]->xmlChildren[0]->xmlChildren[0]->{'a'} |
||
| 30 | ); |
||
| 31 | } |
||
| 32 | |||
| 41 | } |