diff --git a/cake/tests/cases/libs/view/helpers/session.test.php b/cake/tests/cases/libs/view/helpers/session.test.php index 341e3d65e..b39f342a6 100644 --- a/cake/tests/cases/libs/view/helpers/session.test.php +++ b/cake/tests/cases/libs/view/helpers/session.test.php @@ -42,30 +42,30 @@ App::import('Helper', array('Session')); class SessionHelperTest extends CakeTestCase { function setUp() { - $this->Session = new SessionHelper(); + $this->Session = new SessionHelper(); $this->Session->__start(); - - $_SESSION = array('test' => 'info', - 'Message' => array( - 'flash' => array( - 'layout' => 'default', - 'params' => array(), - 'message' => 'This is a calling' - ), - 'notification' => array( - 'layout' => 'sessionHelper', - 'params' => array('title' => 'Notice!', - 'name' => 'Alert!'), - 'message' => 'This is a test of the emergency broadcasting system', - ), - 'bare' => array( - 'layout' => null, - 'message' => 'Bare message', - 'params' => array(), - ), - ), - 'Deeply' => array('nested' => array('key' => 'value')), - ); + + $_SESSION = array( + 'test' => 'info', + 'Message' => array( + 'flash' => array( + 'layout' => 'default', + 'params' => array(), + 'message' => 'This is a calling' + ), + 'notification' => array( + 'layout' => 'sessionHelper', + 'params' => array('title' => 'Notice!', 'name' => 'Alert!'), + 'message' => 'This is a test of the emergency broadcasting system', + ), + 'bare' => array( + 'layout' => null, + 'message' => 'Bare message', + 'params' => array(), + ), + ), + 'Deeply' => array('nested' => array('key' => 'value')), + ); } function tearDown() { @@ -76,19 +76,18 @@ class SessionHelperTest extends CakeTestCase { function testRead() { $result = $this->Session->read('Deeply.nested.key'); $this->assertEqual($result, 'value'); - + $result = $this->Session->read('test'); $this->assertEqual($result, 'info'); - } function testCheck() { $this->assertTrue($this->Session->check('test')); - + $this->assertTrue($this->Session->check('Message.flash.layout')); - + $this->assertFalse($this->Session->check('Does.not.exist')); - + $this->assertFalse($this->Session->check('Nope')); } @@ -98,8 +97,8 @@ class SessionHelperTest extends CakeTestCase { } function testFlash() { - ob_start(); - $this->Session->flash(); + ob_start(); + $this->Session->flash(); $result = ob_get_contents(); ob_clean(); @@ -107,7 +106,7 @@ class SessionHelperTest extends CakeTestCase { $this->assertEqual($result, $expected); $this->assertFalse($this->Session->check('Message.flash')); - Configure::write('viewPaths', array(TEST_CAKE_CORE_INCLUDE_PATH . 'tests' . DS . 'test_app' . DS . 'views'. DS)); + Configure::write('viewPaths', array(TEST_CAKE_CORE_INCLUDE_PATH . 'tests' . DS . 'test_app' . DS . 'views'. DS)); $controller = new Controller(); $this->Session->view = new View($controller); @@ -115,11 +114,11 @@ class SessionHelperTest extends CakeTestCase { $this->Session->flash('notification'); $result = ob_get_contents(); ob_clean(); - + $expected = "
This is a test of the emergency broadcasting system
\n