findAll() public method

public findAll ( $locale, $webspaceKey, Sulu\Component\Content\Repository\Mapping\MappingInterface $mapping, Sulu\Component\Security\Authentication\UserInterface $user = null )
$mapping Sulu\Component\Content\Repository\Mapping\MappingInterface
$user Sulu\Component\Security\Authentication\UserInterface
Ejemplo n.º 1
0
 public function testFindAll()
 {
     $this->initPhpcr();
     $page1 = $this->createPage('test-1', 'de');
     $page11 = $this->createPage('test-1-1', 'de', [], $page1);
     $page2 = $this->createPage('test-2', 'de');
     $page3 = $this->createPage('test-3', 'de');
     $result = $this->contentRepository->findAll('de', 'sulu_io', MappingBuilder::create()->addProperties(['title'])->getMapping());
     $this->assertCount(5, $result);
     $this->assertEquals('/', $result[0]->getPath());
     $this->assertEquals('/test-1', $result[1]->getPath());
     $this->assertEquals('/test-1/test-1-1', $result[2]->getPath());
     $this->assertEquals('/test-2', $result[3]->getPath());
     $this->assertEquals('/test-3', $result[4]->getPath());
 }