public function LintCommandTest::testLintIncorrectFile in Lockr 7.3
File
- vendor/
symfony/ yaml/ Tests/ Command/ LintCommandTest.php, line 40
Class
- LintCommandTest
- Tests the YamlLintCommand.
Namespace
Symfony\Component\Yaml\Tests\CommandCode
public function testLintIncorrectFile() {
$incorrectContent = '
foo:
bar';
$tester = $this
->createCommandTester();
$filename = $this
->createFile($incorrectContent);
$ret = $tester
->execute([
'filename' => $filename,
], [
'decorated' => false,
]);
$this
->assertEquals(1, $ret, 'Returns 1 in case of error');
$this
->assertContains('Unable to parse at line 3 (near "bar").', trim($tester
->getDisplay()));
}