/**
  * @test
  */
 public function hasLeafDescendants()
 {
     $this->assertFalse($this->node->hasLeafDescendants());
     $child = new Container();
     $this->node->add($child);
     $this->assertFalse($this->node->hasLeafDescendants());
     $leaf = $this->getMockBuilder('PHPPdf\\Core\\Node\\Node')->setMethods(array('hasLeafDescendants'))->getMock();
     $leaf->expects($this->atLeastOnce())->method('hasLeafDescendants')->will($this->returnValue(true));
     $child->add($leaf);
     $this->assertTrue($this->node->hasLeafDescendants());
 }