Browse Source

Add test for consecutive dots in a path fragment.

ndm2 10 years ago
parent
commit
7bdc47f797
1 changed files with 14 additions and 1 deletions
  1. 14 1
      tests/TestCase/Network/ResponseTest.php

+ 14 - 1
tests/TestCase/Network/ResponseTest.php

@@ -1187,13 +1187,26 @@ class ResponseTest extends TestCase
      * @expectedExceptionMessage my/ca..t.gif was not found or not readable
      * @return void
      */
-    public function testFileWithDotIntheName()
+    public function testFileWithDotsInTheFilename()
     {
         $response = new Response();
         $response->file('my/ca..t.gif');
     }
 
     /**
+     * test file with .. in a path fragment
+     *
+     * @expectedException \Cake\Network\Exception\NotFoundException
+     * @expectedExceptionMessage my/ca..t/image.gif was not found or not readable
+     * @return void
+     */
+    public function testFileWithDotsInAPathFragment()
+    {
+        $response = new Response();
+        $response->file('my/ca..t/image.gif');
+    }
+
+    /**
      * testFile method
      *
      * @return void