/** * @covers Kunstmaan\NodeBundle\Entity\Node::getParents */ public function testGetParents() { $child = new Node(); $grandChild = new Node(); $child->addNode($grandChild); $this->object->addNode($child); $parents = $grandChild->getParents(); $this->assertEquals(2, count($parents)); $this->assertEquals($child, $parents[1]); $this->assertEquals($this->object, $parents[0]); }