From 6cabfcec5b17e294b8c2fc1fddff16e9351915e5 Mon Sep 17 00:00:00 2001 From: mark_story Date: Sun, 3 Oct 2010 12:15:01 -0400 Subject: [PATCH] Removing dead tests from SessionHelper test case. --- .../cases/libs/view/helpers/session.test.php | 62 +++---------------- 1 file changed, 7 insertions(+), 55 deletions(-) diff --git a/cake/tests/cases/libs/view/helpers/session.test.php b/cake/tests/cases/libs/view/helpers/session.test.php index 708c5554524..c61421bd1ea 100644 --- a/cake/tests/cases/libs/view/helpers/session.test.php +++ b/cake/tests/cases/libs/view/helpers/session.test.php @@ -2,22 +2,22 @@ /** * SessionHelperTest file * - * PHP versions 4 and 5 + * PHP 5 * * CakePHP(tm) Tests * Copyright 2005-2010, Cake Software Foundation, Inc. (http://cakefoundation.org) * - * Licensed under The Open Group Test Suite License - * Redistributions of files must retain the above copyright notice. + * Licensed under The MIT License + * Redistributions of files must retain the above copyright notice * * @copyright Copyright 2005-2010, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests * @package cake * @subpackage cake.tests.cases.libs.view.helpers * @since CakePHP(tm) v 1.2.0.4206 - * @license http://www.opensource.org/licenses/opengroup.php The Open Group Test Suite License + * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ -App::import('Core', array('Helper', 'AppHelper', 'Controller', 'View')); +App::import('Core', array('Controller', 'View')); App::import('Helper', array('Session')); /** @@ -35,6 +35,7 @@ class SessionHelperTest extends CakeTestCase { * @return void */ function setUp() { + parent::setUp(); $controller = null; $this->View = new View($controller); $this->Session = new SessionHelper($this->View); @@ -76,7 +77,7 @@ function setUp() { function tearDown() { $_SESSION = array(); unset($this->View, $this->Session); - App::build(); + parent::tearDown(); } /** @@ -109,17 +110,6 @@ function testCheck() { $this->assertFalse($this->Session->check('Nope')); } -/** - * testWrite method - * - * @access public - * @return void - */ - function testWrite() { - $this->expectError(); - $this->Session->write('NoWay', 'AccessDenied'); - } - /** * testFlash method * @@ -151,42 +141,4 @@ function testFlash() { $this->assertFalse($this->Session->check('Message.bare')); } -/** - * testID method - * - * @access public - * @return void - */ - function testID() { - $id = session_id(); - $result = CakeSession::id(); - $this->assertEqual($id, $result); - } - -/** - * testError method - * - * @access public - * @return void - */ - function testError() { - $result = $this->Session->error(); - $this->assertFalse($result); - - $this->Session->read('CauseError'); - $result = $this->Session->error(); - $expected = "CauseError doesn't exist"; - $this->assertEqual($result, $expected); - } - -/** - * testValid method - * - * @access public - * @return void - */ - function testValid() { - //wierd it always ends up false in the test suite - //$this->assertFalse($this->Session->valid()); - } }