public function testCanGetModifiedNodes()
{
$node1 = M::mock(array('getName' => 'foobar'));
$node2a = M::mock(array('getName' => 'foobaz'));
$node2b = M::mock(array('getName' => 'foobaz'));
$node1->shouldReceive('equals')->with($node1)->andReturn(true);
$node2b->shouldReceive('equals')->with($node2a)->andReturn(false);
$this->comp_tree_mock->shouldReceive('getNodes')->andReturn(array($node1, $node2a));
$this->base_tree_mock->shouldReceive('hasNodeNamed')->with('foobar')->andReturn(true);
$this->base_tree_mock->shouldReceive('hasNodeNamed')->with('foobaz')->andReturn(true);
$this->base_tree_mock->shouldReceive('getNodeNamed')->with('foobar')->andReturn($node1);
$this->base_tree_mock->shouldReceive('getNodeNamed')->with('foobaz')->andReturn($node2b);
$this->assertEquals(array($node2a), $this->diff->getModifiedNodes());
}