diff options
author | Phil Sturgeon <email@philsturgeon.co.uk> | 2012-05-23 19:37:24 +0200 |
---|---|---|
committer | Phil Sturgeon <email@philsturgeon.co.uk> | 2012-05-23 19:42:04 +0200 |
commit | 55a6ddb0c7bab1149bb1ddfa3a1aff46612c91d4 (patch) | |
tree | 5840dd5451c53c5fc01509288c4484d5189a66a1 /tests/codeigniter | |
parent | 37294771ef8cdb0c2d4834783ad79a6bdbc96d77 (diff) |
Input, Session and Cookie get's will return NULL.
Read more about this change here:
http://codeigniter.com/forums/viewthread/215833
Diffstat (limited to 'tests/codeigniter')
-rw-r--r-- | tests/codeigniter/core/Input_test.php | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/tests/codeigniter/core/Input_test.php b/tests/codeigniter/core/Input_test.php index fd0576e38..a066d9960 100644 --- a/tests/codeigniter/core/Input_test.php +++ b/tests/codeigniter/core/Input_test.php @@ -28,11 +28,13 @@ class Input_test extends CI_TestCase { $this->assertTrue( ! $this->input->get()); $this->assertTrue( ! $this->input->get('foo')); - $this->assertTrue($this->input->get() == FALSE); - $this->assertTrue($this->input->get('foo') == FALSE); + // Test we're getting empty results + $this->assertTrue($this->input->get() == NULL); + $this->assertTrue($this->input->get('foo') == NULL); - $this->assertTrue($this->input->get() === FALSE); - $this->assertTrue($this->input->get('foo') === FALSE); + // Test new 3.0 behaviour for non existant results (used to be FALSE) + $this->assertTrue($this->input->get() === NULL); + $this->assertTrue($this->input->get('foo') === NULL); } // -------------------------------------------------------------------- @@ -68,11 +70,11 @@ class Input_test extends CI_TestCase { $this->assertTrue( ! $this->input->post()); $this->assertTrue( ! $this->input->post('foo')); - $this->assertTrue($this->input->post() == FALSE); - $this->assertTrue($this->input->post('foo') == FALSE); + $this->assertTrue($this->input->post() == NULL); + $this->assertTrue($this->input->post('foo') == NULL); - $this->assertTrue($this->input->post() === FALSE); - $this->assertTrue($this->input->post('foo') === FALSE); + $this->assertTrue($this->input->post() === NULL); + $this->assertTrue($this->input->post('foo') === NULL); } // -------------------------------------------------------------------- |