コード例 #1
0
 public function testRenderDataCollectionReturnsDataFromCollectors()
 {
     $r = $this->getRenderer();
     $firstCollector = new FileNameCollector();
     $firstCollector->addFileNames(['sample' => 'file']);
     $r->addCollector($firstCollector);
     $r->addCollector(new DummyCollector());
     $collectedData = $r->collectData();
     $this->assertArrayHasKey('dummy', $collectedData);
     $this->assertArrayHasKey('sys_pathNames', $collectedData);
 }
コード例 #2
0
ファイル: PathManager.php プロジェクト: newup/core
 /**
  * Adds paths to the underlying collectors and tree generators.
  *
  * @param array $paths
  * @throws \NewUp\Exceptions\InvalidPathException
  */
 public function addPaths(array $paths)
 {
     $this->currentCollectorData = $this->filePathCollector->collect();
     foreach ($paths as $path) {
         $this->addPath($path);
     }
 }
コード例 #3
0
ファイル: CoreFunctionsTest.php プロジェクト: newup/core
 private function getCollector()
 {
     $c = new FileNameCollector();
     $c->addFileNames(['test' => '{{ "test_me"|studly }}']);
     return $c;
 }