Exemplo n.º 1
0
 /** Tests for {@link TextNode::append}. */
 public function testAppend()
 {
     $node = new TextNode('Hello');
     $result = $node->append(' there');
     $this->assertSame('Hello there', $node->getText(), 'Single text not added correctly.');
     $this->assertSame($node, $result, 'The returned object is not the same object that was called.');
     $node = new TextNode('Hi');
     $result = $node->append(' there', ', how', ' are', ' you?');
     $this->assertSame('Hi there, how are you?', $node->getText(), 'Multipe texts not added correctly.');
 }