/** * @depends testConstruct */ public function testChange(PHPParser_Node $node) { // change of line $node->setLine(15); $this->assertEquals(15, $node->getLine()); // direct modification $node->subNode = 'newValue'; $this->assertEquals('newValue', $node->subNode); // indirect modification $subNode =& $node->subNode; $subNode = 'newNewValue'; $this->assertEquals('newNewValue', $node->subNode); // removal unset($node->subNode); $this->assertFalse(isset($node->subNode)); }