From ecc260e0be0cdb55c4e4802b78ddd78b0d8b0ebc Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Fri, 24 Jan 2014 14:20:13 +0200 Subject: Righting a wrong in the Session library - Change userdata(), flashdata(), tempdata() to return all the respective data when no parameter is passed. - Revert the addition of all_flashdata(). - Deprecate all_userdata(). - Fix related changelog entries that were all inconsistent. --- tests/codeigniter/libraries/Session_test.php | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'tests/codeigniter/libraries/Session_test.php') diff --git a/tests/codeigniter/libraries/Session_test.php b/tests/codeigniter/libraries/Session_test.php index 6edda99d7..cff0fdbd8 100644 --- a/tests/codeigniter/libraries/Session_test.php +++ b/tests/codeigniter/libraries/Session_test.php @@ -156,11 +156,11 @@ class Session_test extends CI_TestCase { $this->session->native->set_userdata($ndata); // Make sure all values are present - $call = $this->session->cookie->all_userdata(); + $call = $this->session->cookie->userdata(); foreach ($cdata as $key => $value) { $this->assertEquals($value, $call[$key]); } - $nall = $this->session->native->all_userdata(); + $nall = $this->session->native->userdata(); foreach ($ndata as $key => $value) { $this->assertEquals($value, $nall[$key]); } @@ -283,8 +283,8 @@ class Session_test extends CI_TestCase { // Simulate page reload and verify independent messages $this->session->cookie->reload(); $this->session->native->reload(); - $this->assertEquals($cdata, $this->session->cookie->all_flashdata()); - $this->assertEquals($ndata, $this->session->native->all_flashdata()); + $this->assertEquals($cdata, $this->session->cookie->flashdata()); + $this->assertEquals($ndata, $this->session->native->flashdata()); // Keep messages $this->session->cookie->keep_flashdata($kdata); @@ -293,14 +293,14 @@ class Session_test extends CI_TestCase { // Simulate next page reload and verify message persistence $this->session->cookie->reload(); $this->session->native->reload(); - $this->assertEquals($cdata, $this->session->cookie->all_flashdata()); - $this->assertEquals($ndata, $this->session->native->all_flashdata()); + $this->assertEquals($cdata, $this->session->cookie->flashdata()); + $this->assertEquals($ndata, $this->session->native->flashdata()); // Simulate next page reload and verify absence of messages $this->session->cookie->reload(); $this->session->native->reload(); - $this->assertEmpty($this->session->cookie->all_flashdata()); - $this->assertEmpty($this->session->native->all_flashdata()); + $this->assertEmpty($this->session->cookie->flashdata()); + $this->assertEmpty($this->session->native->flashdata()); } /** @@ -329,8 +329,8 @@ class Session_test extends CI_TestCase { // Simulate page reload and make sure all values are present $this->session->cookie->reload(); $this->session->native->reload(); - $this->assertEquals($cdata, $this->session->cookie->all_flashdata()); - $this->assertEquals($ndata, $this->session->native->all_flashdata()); + $this->assertEquals($cdata, $this->session->cookie->flashdata()); + $this->assertEquals($ndata, $this->session->native->flashdata()); } /** -- cgit v1.2.3-24-g4f1b From 1993aab7798282a1af7960e88a5c3835c79d4932 Mon Sep 17 00:00:00 2001 From: darwinel Date: Sat, 8 Feb 2014 00:48:38 +0100 Subject: Small Style fix General Style and Syntax --- tests/codeigniter/libraries/Session_test.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tests/codeigniter/libraries/Session_test.php') diff --git a/tests/codeigniter/libraries/Session_test.php b/tests/codeigniter/libraries/Session_test.php index cff0fdbd8..97e9444ee 100644 --- a/tests/codeigniter/libraries/Session_test.php +++ b/tests/codeigniter/libraries/Session_test.php @@ -8,7 +8,7 @@ class Session_test extends CI_TestCase { protected $settings = array( 'use_cookies' => 0, 'use_only_cookies' => 0, - 'cache_limiter' => false + 'cache_limiter' => FALSE ); protected $setting_vals = array(); protected $cookie_vals; -- cgit v1.2.3-24-g4f1b From 2c2722e6b18c3b2ba49d27bedff33e43cf92bf93 Mon Sep 17 00:00:00 2001 From: darwinel Date: Tue, 11 Feb 2014 20:43:16 +0100 Subject: Some other small writing consistency fixes MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit As described in the Style guide. Found after some grep’ing. --- tests/codeigniter/libraries/Session_test.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tests/codeigniter/libraries/Session_test.php') diff --git a/tests/codeigniter/libraries/Session_test.php b/tests/codeigniter/libraries/Session_test.php index 97e9444ee..6f1332384 100644 --- a/tests/codeigniter/libraries/Session_test.php +++ b/tests/codeigniter/libraries/Session_test.php @@ -91,7 +91,7 @@ class Session_test extends CI_TestCase { $cmsg1 = 'Some test data'; $cmsg2 = 42; $nmsg1 = 'Other test data'; - $nmsg2 = true; + $nmsg2 = TRUE; $this->session->cookie->set_userdata($key1, $cmsg1); $this->session->set_userdata($ckey2, $cmsg2); $this->session->native->set_userdata($key1, $nmsg1); -- cgit v1.2.3-24-g4f1b