From 4db38f26ca17adf3c2275e919e9c69a62ef7505d Mon Sep 17 00:00:00 2001 From: bancer Date: Mon, 18 Mar 2019 12:43:26 +0100 Subject: [PATCH] Improve unit test --- lib/Cake/Test/Case/Controller/ApplicationControllerTest.php | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/lib/Cake/Test/Case/Controller/ApplicationControllerTest.php b/lib/Cake/Test/Case/Controller/ApplicationControllerTest.php index d72c7e881..2487aa4db 100644 --- a/lib/Cake/Test/Case/Controller/ApplicationControllerTest.php +++ b/lib/Cake/Test/Case/Controller/ApplicationControllerTest.php @@ -34,7 +34,7 @@ class TransSessionIdController extends AppController { 'controller' => 'trans_session_id', 'action' => 'next_step', '?' => array( - htmlspecialchars($sessionName) => htmlspecialchars($sessionId), + $sessionName => $sessionId, ), )); } @@ -78,8 +78,7 @@ class ApplicationControllerTest extends ControllerTestCase { */ public function testRedirect() { $sessionId = 'o7k64tlhil9pakp89j6d8ovlqk'; - CakeSession::id($sessionId); - $this->testAction('/trans_session_id/next'); + $this->testAction('/trans_session_id/next?CAKEPHP=' . $sessionId); $this->assertContains('/trans_session_id/next_step?CAKEPHP=' . $sessionId, $this->headers['Location']); $expectedConfig = array( 'cookie' => 'CAKEPHP', @@ -100,7 +99,6 @@ class ApplicationControllerTest extends ControllerTestCase { ); $actualConfig = Configure::read('Session'); $this->assertEquals($expectedConfig, $actualConfig); - $this->assertTrue(false, __METHOD__ . ' test has been run'); } }