|
|
@@ -39,6 +39,7 @@ class IntegrationTestCaseTest extends IntegrationTestCase
|
|
|
parent::setUp();
|
|
|
Configure::write('App.namespace', 'TestApp');
|
|
|
|
|
|
+ Router::connect('/get/:controller/:action', ['_method' => 'GET'], ['routeClass' => 'InflectedRoute']);
|
|
|
Router::connect('/:controller/:action/*', [], ['routeClass' => 'InflectedRoute']);
|
|
|
DispatcherFactory::clear();
|
|
|
DispatcherFactory::add('Routing');
|
|
|
@@ -183,6 +184,23 @@ class IntegrationTestCaseTest extends IntegrationTestCase
|
|
|
$this->assertNotEmpty($this->_response);
|
|
|
$this->assertInstanceOf('Cake\Network\Response', $this->_response);
|
|
|
$this->assertEquals('This is a test', $this->_response->body());
|
|
|
+
|
|
|
+ $this->_response = null;
|
|
|
+ $this->get('/get/request_action/test_request_action');
|
|
|
+ $this->assertEquals('This is a test', $this->_response->body());
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * Test sending get requests sets the request method
|
|
|
+ *
|
|
|
+ * @return void
|
|
|
+ */
|
|
|
+ public function testGetSpecificRouteHttpServer()
|
|
|
+ {
|
|
|
+ $this->useHttpServer(true);
|
|
|
+ $this->get('/get/request_action/test_request_action');
|
|
|
+ $this->assertResponseOk();
|
|
|
+ $this->assertEquals('This is a test', $this->_response->body());
|
|
|
}
|
|
|
|
|
|
/**
|