From b62aa830639a288d6af0a5ad7fa401c8ad966534 Mon Sep 17 00:00:00 2001 From: ionas Date: Fri, 1 Jan 2016 15:45:42 +0000 Subject: [PATCH] utilize phpunit test docblock conventions --- tests/TestCase/Core/ConfigureTest.php | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/tests/TestCase/Core/ConfigureTest.php b/tests/TestCase/Core/ConfigureTest.php index b9f139b0364..7af1ed3c994 100644 --- a/tests/TestCase/Core/ConfigureTest.php +++ b/tests/TestCase/Core/ConfigureTest.php @@ -84,17 +84,13 @@ public function testReadOrFail() /** * testReadOrFail method * + * @expectedException RuntimeException + * @expectedExceptionMessage Expected "This.Key.Does.Not.exist" configuration * @return void */ public function testReadOrFailThrowingException() { - try { - $void = Configure::readOrFail('This.Key.Does.Not.exist'); - $this->fail('Expected exception to be thrown.'); - } catch (\Exception $e) { - $this->assertTrue($e instanceof \RuntimeException); - $this->assertEquals('Expected "This.Key.Does.Not.exist" configuration.', $e->getMessage()); - } + Configure::readOrFail('This.Key.Does.Not.exist'); } /**