public function __construct($bin, NameTools $nameTools)
 {
     $this->bin = $bin;
     if (!$this->checkInstallation()) {
         throw new \InvalidArgumentException('Please install/configure phpunit-skelgen binary');
     }
     $this->nameTools = $nameTools;
     $this->bootstrapFile = $this->nameTools->getRootDir() . '/bootstrap.php.cache';
 }
コード例 #2
0
 protected function createLocationMetadata($filename)
 {
     return new LocationMetadata($filename, $this->nameTools->createQualifiedClassName($filename));
 }
コード例 #3
0
 public function testCreateProductionClassFilename()
 {
     foreach ($this->cases as $expected => $input) {
         $this->assertEquals($this->nameTools->createProductionClassFilename(self::FAKE_SRC . $input), self::FAKE_SRC . $expected);
     }
 }