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); }
/** * 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); } }
private function getCollector() { $c = new FileNameCollector(); $c->addFileNames(['test' => '{{ "test_me"|studly }}']); return $c; }