addPath() public method

Add a path to the list of tracked paths (this can be both dir's or files).
public addPath ( string $path ) : Tracker
$path string the path to track.
return Tracker this instance.
Exemplo n.º 1
0
 /**
  * @expectedException \Symfony\Component\Filesystem\Exception\FileNotFoundException
  * @expectedExceptionMessage File "/i/dont/exist" could not be found.
  */
 public function testAddInvalidPath()
 {
     $profiler = new Profiler();
     $finder = $this->getMock(TemplateFinderInterface::class);
     $fixture_path = realpath(__DIR__ . '/../../Fixture');
     $tracker = new Tracker($profiler, $finder, $fixture_path . '/cache', $fixture_path, []);
     $tracker->addPath("/i/dont/exist");
 }
Exemplo n.º 2
0
 /**
  * Test addPath for invalid path.
  *
  * @expectedException \Symfony\Component\Filesystem\Exception\FileNotFoundException
  * @expectedExceptionMessage File "/i/dont/exist" could not be found.
  */
 public function testAddInvalidPath()
 {
     $profiler = new Profiler();
     $finder = $this->getMockBuilder(TemplateFinderInterface::class)->getMock();
     $tracker = new Tracker($profiler, $finder, $this->root_dir, $this->asset_dir, $this->output_dir, []);
     $tracker->addPath("/i/dont/exist");
 }