8000 Separate tests for invalid and missing config · symfony/symfony@c8f8840 · GitHub
[go: up one dir, main page]

Skip to content

Commit c8f8840

Browse files
Separate tests for invalid and missing config
1 parent a36885f commit c8f8840

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

src/Symfony/Component/Yaml/Tests/Command/LintCommandTest.php

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -152,10 +152,16 @@ public function testLintWithExclude()
152152
$this->assertStringContainsString('All 0 YAML files contain valid syntax.', trim($tester->getDisplay()));
153153
}
154154

155-
public function testIncorrectLintConfig()
155+
public function testMissingLintConfig()
156156
{
157157
$this->expectException('RuntimeException');
158-
$this->createCommandTester()->execute(['filename' => '.yamllint.yml'], ['decorated' => false]);
158+
$this->createCommandTester()->execute(['--config' => 'missing.yml'], ['decorated' => false]);
159+
}
160+
161+
public function testInvalidLintConfig()
162+
{
163+
$this->expectException('RuntimeException');
164+
$this->createCommandTester()->execute(['--config' => $this->createFile('foo: bar')], ['decorated' => false]);
159165
}
160166

161167
public function testCorrectLintConfig()

0 commit comments

Comments
 (0)
0