Migrating SessionHelperTest to phpunit

This commit is contained in:
José Lorenzo Rodríguez 2010-06-04 23:42:21 -04:30
parent 94dd8a2543
commit 7aa01c4c77

View file

@ -37,7 +37,7 @@ class SessionHelperTest extends CakeTestCase {
* @access public * @access public
* @return void * @return void
*/ */
function startTest() { function setUp() {
$this->Session = new SessionHelper(); $this->Session = new SessionHelper();
$_SESSION = array( $_SESSION = array(
@ -77,27 +77,9 @@ class SessionHelperTest extends CakeTestCase {
function tearDown() { function tearDown() {
$_SESSION = array(); $_SESSION = array();
unset($this->Session); unset($this->Session);
}
/**
* endTest
*
* @access public
* @return void
*/
function endTest() {
App::build(); App::build();
} }
/**
* test construction and initial property settings
*
* @return void
*/
function testConstruct() {
$this->assertFalse(empty($this->Session->sessionTime));
$this->assertFalse(empty($this->Session->security));
}
/** /**
* testRead method * testRead method
* *
@ -220,7 +202,7 @@ class SessionHelperTest extends CakeTestCase {
$this->assertFalse($this->Session->flash('bare')); $this->assertFalse($this->Session->flash('bare'));
$result = ob_get_contents(); $result = ob_get_contents();
ob_clean(); ob_clean();
$this->assertFalse($result); $this->assertEquals($result, '');
} }
/** /**