Skip to content

Commit 2c985ab

Browse files
committed
test cases updated for new model 3
1 parent 30500c3 commit 2c985ab

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

test/csrfprotector_test.php

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -250,7 +250,9 @@ public function testAuthorisePost_success()
250250
{
251251

252252
$_SERVER['REQUEST_METHOD'] = 'POST';
253-
$_POST[csrfprotector::$config['CSRFP_TOKEN']] = $_GET[csrfprotector::$config['CSRFP_TOKEN']] = $_SESSION[csrfprotector::$config['CSRFP_TOKEN']];
253+
$_POST[csrfprotector::$config['CSRFP_TOKEN']]
254+
= $_GET[csrfprotector::$config['CSRFP_TOKEN']]
255+
= $_SESSION[csrfprotector::$config['CSRFP_TOKEN']][0];
254256
$temp = $_SESSION[csrfprotector::$config['CSRFP_TOKEN']];
255257

256258
csrfprotector::authorizePost(); //will create new session and cookies
@@ -262,7 +264,9 @@ public function testAuthorisePost_success()
262264
// For get method
263265
$_SERVER['REQUEST_METHOD'] = 'GET';
264266
csrfp_wrapper::changeRequestType('GET');
265-
$_POST[csrfprotector::$config['CSRFP_TOKEN']] = $_GET[csrfprotector::$config['CSRFP_TOKEN']] = $_SESSION[csrfprotector::$config['CSRFP_TOKEN']];
267+
$_POST[csrfprotector::$config['CSRFP_TOKEN']]
268+
= $_GET[csrfprotector::$config['CSRFP_TOKEN']]
269+
= $_SESSION[csrfprotector::$config['CSRFP_TOKEN']][0];
266270
$temp = $_SESSION[csrfprotector::$config['CSRFP_TOKEN']];
267271

268272
csrfprotector::authorizePost(); //will create new session and cookies

0 commit comments

Comments
 (0)