|
|
@@ -121,4 +121,21 @@ class AssetDispatcherTest extends CakeTestCase {
|
|
|
$this->assertSame($response, $filter->beforeDispatch($event));
|
|
|
$this->assertEquals($time->format('D, j M Y H:i:s') . ' GMT', $response->modified());
|
|
|
}
|
|
|
+
|
|
|
+/**
|
|
|
+ * Test that no exceptions are thrown for //index.php type urls.
|
|
|
+ *
|
|
|
+ * @return void
|
|
|
+ */
|
|
|
+ public function test404OnDoubleSlash() {
|
|
|
+ $filter = new AssetDispatcher();
|
|
|
+
|
|
|
+ $response = $this->getMock('CakeResponse', array('_sendHeader'));
|
|
|
+ $request = new CakeRequest('//index.php');
|
|
|
+ $event = new CakeEvent('Dispatcher.beforeRequest', $this, compact('request', 'response'));
|
|
|
+
|
|
|
+ $this->assertNull($filter->beforeDispatch($event));
|
|
|
+ $this->assertFalse($event->isStopped());
|
|
|
+ }
|
|
|
+
|
|
|
}
|