|
|
@@ -41,7 +41,7 @@ class PhpReaderTest extends CakeTestCase {
|
|
|
);
|
|
|
|
|
|
/**
|
|
|
- * setup
|
|
|
+ * Setup.
|
|
|
*
|
|
|
* @return void
|
|
|
*/
|
|
|
@@ -51,7 +51,7 @@ class PhpReaderTest extends CakeTestCase {
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
- * test reading files
|
|
|
+ * Test reading files.
|
|
|
*
|
|
|
* @return void
|
|
|
*/
|
|
|
@@ -66,20 +66,31 @@ class PhpReaderTest extends CakeTestCase {
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
+ * Test an exception is thrown by reading files that exist without .php extension.
|
|
|
+ *
|
|
|
+ * @expectedException ConfigureException
|
|
|
+ * @return void
|
|
|
+ */
|
|
|
+ public function testReadWithExistentFileWithoutExtension() {
|
|
|
+ $reader = new PhpReader($this->path);
|
|
|
+ $reader->read('no_php_extension');
|
|
|
+ }
|
|
|
+
|
|
|
+/**
|
|
|
* Test an exception is thrown by reading files that don't exist.
|
|
|
*
|
|
|
* @expectedException ConfigureException
|
|
|
* @return void
|
|
|
*/
|
|
|
- public function testReadWithNonExistantFile() {
|
|
|
+ public function testReadWithNonExistentFile() {
|
|
|
$reader = new PhpReader($this->path);
|
|
|
$reader->read('fake_values');
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
- * test reading an empty file.
|
|
|
+ * Test reading an empty file.
|
|
|
*
|
|
|
- * @expectedException RuntimeException
|
|
|
+ * @expectedException ConfigureException
|
|
|
* @return void
|
|
|
*/
|
|
|
public function testReadEmptyFile() {
|
|
|
@@ -88,7 +99,7 @@ class PhpReaderTest extends CakeTestCase {
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
- * test reading keys with ../ doesn't work
|
|
|
+ * Test reading keys with ../ doesn't work.
|
|
|
*
|
|
|
* @expectedException ConfigureException
|
|
|
* @return void
|
|
|
@@ -99,7 +110,7 @@ class PhpReaderTest extends CakeTestCase {
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
- * test reading from plugins
|
|
|
+ * Test reading from plugins.
|
|
|
*
|
|
|
* @return void
|
|
|
*/
|