コード例 #1
0
 /** @test */
 public function getEmptyTreeReturnsEmptyTree()
 {
     $repositoryMock = $this->buildRepositoryMock();
     $treeBuilder = new Tx_PtExtbase_Tree_TreeBuilder($repositoryMock);
     $tree = $treeBuilder->getEmptyTree('namespace', 'ourRootLabel');
     $this->assertTrue(is_a($tree->getRoot(), Tx_PtExtbase_Tree_NodeInterface));
     $this->assertEquals($tree->getNamespace(), 'namespace');
     $this->assertEquals($tree->getRoot()->getLabel(), 'ourRootLabel');
 }
コード例 #2
0
 /**
  * Returns an empty tree for given namespace and root label
  *
  * @param $namespace
  * @param string $rootLabel
  * @return Tx_PtExtbase_Tree_Tree Empty tree for given namespace and root label
  */
 public function getEmptyTree($namespace, $rootLabel = 'root')
 {
     return $this->treeBuilder->getEmptyTree($namespace, $rootLabel);
 }