You are here

public function LintCommandTest::testLintCorrectFile in Lockr 7.3

File

vendor/symfony/yaml/Tests/Command/LintCommandTest.php, line 29

Class

LintCommandTest
Tests the YamlLintCommand.

Namespace

Symfony\Component\Yaml\Tests\Command

Code

public function testLintCorrectFile() {
  $tester = $this
    ->createCommandTester();
  $filename = $this
    ->createFile('foo: bar');
  $ret = $tester
    ->execute([
    'filename' => $filename,
  ], [
    'verbosity' => OutputInterface::VERBOSITY_VERBOSE,
    'decorated' => false,
  ]);
  $this
    ->assertEquals(0, $ret, 'Returns 0 in case of success');
  $this
    ->assertRegExp('/^\\/\\/ OK in /', trim($tester
    ->getDisplay()));
}