Ejemplo n.º 1
0
 /**
  * @param \CliTester            $I
  */
 public function testDocumentUsesRightStandard(\CliTester $I)
 {
     $I->wantTo('verify that the documentor uses the right standard');
     $template = dirname(dirname(__DIR__)) . '/src/Task/CodeSniffer/codestyle.html';
     $outfile = dirname(__DIR__) . '/_output/codestyle.html';
     if (file_exists($outfile)) {
         unlink($outfile);
     }
     foreach (['Joomla', 'WordPress', 'PSR2'] as $standard) {
         $I->dontSeeFileFound($outfile);
         $I->runShellCommand("vendor/bin/robo document:codestyle --standard {$standard} --outfile  {$outfile} --template {$template}");
         $I->seeFileFound($outfile);
         $I->seeInThisFile("{$standard} Coding Standards");
         unlink($outfile);
     }
 }