Browse Source

Clarified exception message

ionas 10 years ago
parent
commit
909bac8c89
2 changed files with 2 additions and 2 deletions
  1. 1 1
      src/Core/Configure.php
  2. 1 1
      tests/TestCase/Core/ConfigureTest.php

+ 1 - 1
src/Core/Configure.php

@@ -159,7 +159,7 @@ class Configure
      */
     public static function readOrFail($var) {
         if (static::check($var) === false) {
-            throw new RuntimeException(sprintf('Expected "%s" configuration.', $var));
+            throw new RuntimeException(sprintf('Expected configuration key "%s" not found.', $var));
         }
         return static::read($var);
     }

+ 1 - 1
tests/TestCase/Core/ConfigureTest.php

@@ -85,7 +85,7 @@ class ConfigureTest extends TestCase
      * testReadOrFail method
      *
      * @expectedException RuntimeException
-     * @expectedExceptionMessage Expected "This.Key.Does.Not.exist" configuration
+     * @expectedExceptionMessage Expected configuration key "This.Key.Does.Not.exist" not found
      * @return void
      */
     public function testReadOrFailThrowingException()