From 12d9352d38229c5508472d3e28c17eff72588e64 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9s=20Monta=C3=B1ez?= Date: Sun, 29 Jan 2017 19:43:39 -0300 Subject: [PATCH] [Nostromo] Improve Tests and Coverage --- tests/MageApplicationTest.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/tests/MageApplicationTest.php b/tests/MageApplicationTest.php index c3f2705..4694fe1 100644 --- a/tests/MageApplicationTest.php +++ b/tests/MageApplicationTest.php @@ -28,6 +28,8 @@ class MageApplicationTest extends TestCase { try { $application = new MageApplication(__DIR__ . '/Resources/invalid.yml'); + $application->configure(); + $this->assertTrue(false, 'Application did not throw exception.'); } catch (Exception $exception) { $this->assertTrue($exception instanceof RuntimeException); $this->assertEquals(sprintf('The file "%s" does not have a valid Magallanes configuration.', __DIR__ . '/Resources/invalid.yml'), $exception->getMessage()); @@ -38,6 +40,8 @@ class MageApplicationTest extends TestCase { try { $application = new MageApplication(__DIR__ . '/Resources/invalid-yaml.yml'); + $application->configure(); + $this->assertTrue(false, 'Application did not throw exception.'); } catch (Exception $exception) { $this->assertTrue($exception instanceof RuntimeException); $this->assertEquals(sprintf('Error parsing the file "%s".', __DIR__ . '/Resources/invalid-yaml.yml'), $exception->getMessage()); @@ -48,6 +52,8 @@ class MageApplicationTest extends TestCase { try { $application = new MageApplication(__DIR__ . '/Resources/this-does-not-exists.yml'); + $application->configure(); + $this->assertTrue(false, 'Application did not throw exception.'); } catch (Exception $exception) { $this->assertTrue($exception instanceof RuntimeException); $this->assertEquals(sprintf('The file "%s" does not exists or is not readable.', __DIR__ . '/Resources/this-does-not-exists.yml'), $exception->getMessage());