/** * @dataProvider getNextData */ public function testGetNext($expected, $path, $anchor = null, $depth = null, $class = 'Doctrine\\ODM\\PHPCR\\Document\\Generic') { $next = $this->helper->getNext($path, $anchor, $depth); if (null === $expected) { $this->assertNull($next); } else { $this->assertInstanceOf($class, $next); $this->assertEquals($expected, $next->getId()); } }