diff --git a/cake/tests/cases/libs/session.test.php b/cake/tests/cases/libs/session.test.php index d81bc6ccf..bf2ae822f 100644 --- a/cake/tests/cases/libs/session.test.php +++ b/cake/tests/cases/libs/session.test.php @@ -1,5 +1,5 @@ Session->write('SessionTestCase', 'value'); - $result = $this->Session->check('SessionTestCase'); - $this->assertEqual($result, true); - - $result = $this->Session->check('NotExistingSessionTestCase'); - $this->assertEqual($result, false); + $this->assertTrue($this->Session->check('SessionTestCase')); + + $this->assertFalse($this->Session->check('NotExistingSessionTestCase'), false); } function testCheckingSavedEmpty() { $this->Session->write('SessionTestCase', 0); - $result = $this->Session->check('SessionTestCase'); - $this->assertEqual($result, true); + $this->assertTrue($this->Session->check('SessionTestCase')); $this->Session->write('SessionTestCase', '0'); - $result = $this->Session->check('SessionTestCase'); - $this->assertEqual($result, true); + $this->assertTrue($this->Session->check('SessionTestCase')); $this->Session->write('SessionTestCase', false); - $result = $this->Session->check('SessionTestCase'); - $this->assertEqual($result, true); + $this->assertTrue($this->Session->check('SessionTestCase')); $this->Session->write('SessionTestCase', null); - $result = $this->Session->check('SessionTestCase'); - $this->assertEqual($result, null); + $this->assertFalse($this->Session->check('SessionTestCase')); } function testReadingSavedEmpty() { $this->Session->write('SessionTestCase', 0); - $result = $this->Session->read('SessionTestCase'); - $this->assertEqual($result, 0); + $this->assertEqual($this->Session->read('SessionTestCase'), 0); $this->Session->write('SessionTestCase', '0'); - $result = $this->Session->read('SessionTestCase'); - $this->assertEqual($result, '0'); + $this->assertEqual($this->Session->read('SessionTestCase'), '0'); + $this->assertFalse($this->Session->read('SessionTestCase') === 0); $this->Session->write('SessionTestCase', false); - $result = $this->Session->read('SessionTestCase'); - $this->assertEqual($result, false); + $this->assertFalse($this->Session->read('SessionTestCase')); $this->Session->write('SessionTestCase', null); - $result = $this->Session->read('SessionTestCase'); - $this->assertEqual($result, null); + $this->assertEqual($this->Session->read('SessionTestCase'), null); } function tearDown() { diff --git a/cake/tests/cases/libs/view/helpers/html.test.php b/cake/tests/cases/libs/view/helpers/html.test.php index d5ffba104..3e5058c41 100644 --- a/cake/tests/cases/libs/view/helpers/html.test.php +++ b/cake/tests/cases/libs/view/helpers/html.test.php @@ -42,29 +42,30 @@ class HtmlHelperTest extends UnitTestCase { var $html = null; function setUp() { - $this->html = new HtmlHelper(); + $this->Html = new HtmlHelper(); $view = new View(new TheHtmlTestController()); ClassRegistry::addObject('view', $view); } function testSelectTag() { - @$result = $this->html->selectTag('Model/field', array()); + @$result = $this->Html->selectTag('Model/field', array()); $this->assertPattern('/^