Example #1
0
 /**
  * @param FileTool $tool
  * @param string $input
  * @param string $expect
  */
 public static function assertFixer(FileTool $tool, $input, $expect)
 {
     $path = BaseTestCase::createTempFile($input);
     $file = new File($path, File::STATUS_UNKNOWN);
     self::assertNotEmpty($file->getContent()->get());
     # content is loaded, we can delete source file
     unlink($path);
     $tool->process($file, new Report());
     $output = $file->getContent()->get();
     static::assertEquals($expect, $output);
 }
Example #2
0
 /**
  * @param FileTool $fileTool
  * @return $this
  */
 public function removeTool(FileTool $fileTool)
 {
     $name = $fileTool->getName();
     unset($this->tools[$name]);
     return $this;
 }