/** * testReadingSavedEmpty method * * @return void */ public function testReadingSavedEmpty() { TestCakeSession::write('', 'empty string'); $this->assertTrue(TestCakeSession::check('')); $this->assertEquals('empty string', TestCakeSession::read('')); TestCakeSession::write('SessionTestCase', 0); $this->assertEquals(0, TestCakeSession::read('SessionTestCase')); TestCakeSession::write('SessionTestCase', '0'); $this->assertEquals('0', TestCakeSession::read('SessionTestCase')); $this->assertFalse(TestCakeSession::read('SessionTestCase') === 0); TestCakeSession::write('SessionTestCase', false); $this->assertFalse(TestCakeSession::read('SessionTestCase')); TestCakeSession::write('SessionTestCase', null); $this->assertNull(TestCakeSession::read('SessionTestCase')); }
/** * testCheckEmpty * * @return void */ public function testCheckEmpty() { $this->assertFalse(TestCakeSession::check('')); $this->assertFalse(TestCakeSession::check(null)); }
/** * testCheckEmpty * * @access public * @return void */ function testCheckEmpty() { $this->assertFalse(TestCakeSession::check()); }