[Nostromo] Improve tests. Mess Detector recommendations.

This commit is contained in:
Andrés Montañez
2017-01-07 19:08:25 -03:00
parent 193265e424
commit 93af5ee8cc
3 changed files with 29 additions and 4 deletions
+11
View File
@@ -36,6 +36,17 @@ class MageApplicationTest extends TestCase
}
}
public function testParserError()
{
try {
$application = new MageApplication();
$application->configure(__DIR__ . '/Resources/invalid-yaml.yml');
} catch (Exception $exception) {
$this->assertTrue($exception instanceof RuntimeException);
$this->assertEquals(sprintf('Error parsing the file "%s".', __DIR__ . '/Resources/invalid-yaml.yml'), $exception->getMessage());
}
}
public function testInvalidFile()
{
try {
@@ -0,0 +1,6 @@
magephp:
environments:
hosts:
- host1
- host2
- host3