/** * @covers \BackBee\NestedNode\Repository\NestedNodeRepository::getPrevSibling */ public function testGetPrevSibling() { $child1 = $this->repository->find('a-child1'); $child2 = $this->repository->find('a-child2'); $subchild1 = $this->repository->find('a-subchild1'); $subchild2 = $this->repository->find('a-subchild2'); $this->assertNull($this->repository->getPrevSibling($this->root_desc)); $this->assertNull($this->repository->getPrevSibling($child1)); $this->assertNull($this->repository->getPrevSibling($subchild1)); $this->assertEquals($subchild1, $this->repository->getPrevSibling($subchild2)); $this->assertEquals($child1, $this->repository->getPrevSibling($child2)); }