diff --git a/cake/tests/cases/libs/controller/components/request_handler.test.php b/cake/tests/cases/libs/controller/components/request_handler.test.php index 84dd9e0de..e383ce802 100644 --- a/cake/tests/cases/libs/controller/components/request_handler.test.php +++ b/cake/tests/cases/libs/controller/components/request_handler.test.php @@ -41,8 +41,9 @@ class RequestHandlerComponentTest extends CakeTestCase { } function testRenderAs() { + $this->assertFalse(in_array('Xml', $this->Controller->helpers)); $this->RequestHandler->renderAs($this->Controller, 'xml'); - $this->assertEqual($this->Controller->helpers, array('Html', 'Xml')); + $this->assertTrue(in_array('Xml', $this->Controller->helpers)); } function tearDown() { diff --git a/cake/tests/cases/libs/controller/components/session.test.php b/cake/tests/cases/libs/controller/components/session.test.php index fd39693eb..4435bf1e7 100644 --- a/cake/tests/cases/libs/controller/components/session.test.php +++ b/cake/tests/cases/libs/controller/components/session.test.php @@ -26,7 +26,9 @@ * @lastmodified $Date$ * @license http://www.opensource.org/licenses/opengroup.php The Open Group Test Suite License */ -uses('controller' . DS . 'components' . DS .'session'); +uses('controller' . DS . 'controller', 'controller' . DS . 'components' . DS .'session'); + +class SessionTestController extends Controller {} /** * Short description for class. * @@ -35,8 +37,23 @@ uses('controller' . DS . 'components' . DS .'session'); */ class SessionComponentTest extends CakeTestCase { - function skip() { - $this->skipif (true, 'SessionComponentTest not implemented'); + function setUp() { + $this->Session = new SessionComponent(); + } + + function testSessionAutoStart() { + $this->Session->startup(new SessionTestController()); + $this->assertTrue(isset($_SESSION) && empty($_SESSION)); + } + + function testSessionWriting() { + $this->assertTrue($this->Session->write('Test.key.path', 'some value')); + $this->assertEqual($this->Session->read('Test.key.path'), 'some value'); + } + + function tearDown() { + unset($this->Session); } } -?> \ No newline at end of file + +?>