|
@@ -6,11 +6,11 @@ class IntegrationTestCaseTest extends IntegrationTestCase {
|
|
|
public function setUp() {
|
|
public function setUp() {
|
|
|
parent::setUp();
|
|
parent::setUp();
|
|
|
|
|
|
|
|
- App::build(array(
|
|
|
|
|
- 'Controller' => array(CakePlugin::path('Shim') . 'Test' . DS . 'test_app' . DS . 'Controller' . DS),
|
|
|
|
|
- 'Model' => array(CakePlugin::path('Shim') . 'Test' . DS . 'test_app' . DS . 'Model' . DS),
|
|
|
|
|
- 'View' => array(CakePlugin::path('Shim') . 'Test' . DS . 'test_app' . DS . 'View' . DS)
|
|
|
|
|
- ), App::RESET);
|
|
|
|
|
|
|
+ App::build([
|
|
|
|
|
+ 'Controller' => [CakePlugin::path('Shim') . 'Test' . DS . 'test_app' . DS . 'Controller' . DS],
|
|
|
|
|
+ 'Model' => [CakePlugin::path('Shim') . 'Test' . DS . 'test_app' . DS . 'Model' . DS],
|
|
|
|
|
+ 'View' => [CakePlugin::path('Shim') . 'Test' . DS . 'test_app' . DS . 'View' . DS]
|
|
|
|
|
+ ], App::RESET);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
@@ -19,7 +19,7 @@ class IntegrationTestCaseTest extends IntegrationTestCase {
|
|
|
* @return void
|
|
* @return void
|
|
|
*/
|
|
*/
|
|
|
public function testBasic() {
|
|
public function testBasic() {
|
|
|
- $this->get(array('controller' => 'items', 'action' => 'index'));
|
|
|
|
|
|
|
+ $this->get(['controller' => 'items', 'action' => 'index']);
|
|
|
$this->assertResponseCode(200);
|
|
$this->assertResponseCode(200);
|
|
|
$this->assertNoRedirect();
|
|
$this->assertNoRedirect();
|
|
|
$this->assertResponseNotEmpty();
|
|
$this->assertResponseNotEmpty();
|
|
@@ -32,10 +32,10 @@ class IntegrationTestCaseTest extends IntegrationTestCase {
|
|
|
* @return void
|
|
* @return void
|
|
|
*/
|
|
*/
|
|
|
public function testPosting() {
|
|
public function testPosting() {
|
|
|
- $data = array(
|
|
|
|
|
|
|
+ $data = [
|
|
|
'key' => 'sth'
|
|
'key' => 'sth'
|
|
|
- );
|
|
|
|
|
- $this->post(array('controller' => 'items', 'action' => 'posting'), $data);
|
|
|
|
|
|
|
+ ];
|
|
|
|
|
+ $this->post(['controller' => 'items', 'action' => 'posting'], $data);
|
|
|
$this->assertResponseCode(200);
|
|
$this->assertResponseCode(200);
|
|
|
$this->assertNoRedirect();
|
|
$this->assertNoRedirect();
|
|
|
}
|
|
}
|
|
@@ -46,9 +46,9 @@ class IntegrationTestCaseTest extends IntegrationTestCase {
|
|
|
* @return void
|
|
* @return void
|
|
|
*/
|
|
*/
|
|
|
public function testSession() {
|
|
public function testSession() {
|
|
|
- $this->session(array('Auth.User.id' => 1));
|
|
|
|
|
|
|
+ $this->session(['Auth.User.id' => 1]);
|
|
|
|
|
|
|
|
- $this->get(array('controller' => 'items', 'action' => 'session'));
|
|
|
|
|
|
|
+ $this->get(['controller' => 'items', 'action' => 'session']);
|
|
|
$this->assertResponseCode(200);
|
|
$this->assertResponseCode(200);
|
|
|
$this->assertNoRedirect();
|
|
$this->assertNoRedirect();
|
|
|
|
|
|
|
@@ -61,7 +61,7 @@ class IntegrationTestCaseTest extends IntegrationTestCase {
|
|
|
* @return void
|
|
* @return void
|
|
|
*/
|
|
*/
|
|
|
public function testRedirecting() {
|
|
public function testRedirecting() {
|
|
|
- $this->get(array('controller' => 'items', 'action' => 'redirecting'));
|
|
|
|
|
|
|
+ $this->get(['controller' => 'items', 'action' => 'redirecting']);
|
|
|
$this->assertResponseCode(302);
|
|
$this->assertResponseCode(302);
|
|
|
$this->assertRedirect('/foobar');
|
|
$this->assertRedirect('/foobar');
|
|
|
|
|
|
|
@@ -79,7 +79,7 @@ class IntegrationTestCaseTest extends IntegrationTestCase {
|
|
|
* @return void
|
|
* @return void
|
|
|
*/
|
|
*/
|
|
|
public function testExceptional() {
|
|
public function testExceptional() {
|
|
|
- $this->get(array('controller' => 'items', 'action' => 'exceptional'));
|
|
|
|
|
|
|
+ $this->get(['controller' => 'items', 'action' => 'exceptional']);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
}
|
|
}
|