public function testGetNodeByPath() { $path = '/jcr:root'; $node = $this->om->getNodeByPath($path); $this->assertInstanceOf('Jackalope\\Node', $node); $children = $node->getNodes(); $this->assertInstanceOf('Iterator', $children); $this->assertCount(2, $children); $this->assertSame($node, $this->om->getNodeByPath($path)); }
public function testGetNodeByPath() { $factory = new Factory(); $path = '/jcr:root'; $om = new ObjectManager($factory, $this->getTransportStub($path), $this->getSessionMock()); $node = $om->getNodeByPath($path); $this->assertInstanceOf('Jackalope\\Node', $node); $children = $node->getNodes(); $this->assertInstanceOf('Iterator', $children); $this->assertSame(2, count($children)); $this->assertSame($node, $om->getNode($path)); }