From 5760f41124e899edba9f49d533a7a7ad3652a0ed Mon Sep 17 00:00:00 2001 From: Mark Story Date: Wed, 16 Dec 2009 22:57:04 -0500 Subject: [PATCH] Adding tests for component config setting from initialize() --- .../libs/controller/components/cookie.test.php | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/cake/tests/cases/libs/controller/components/cookie.test.php b/cake/tests/cases/libs/controller/components/cookie.test.php index 6bb0a2372..742f391be 100644 --- a/cake/tests/cases/libs/controller/components/cookie.test.php +++ b/cake/tests/cases/libs/controller/components/cookie.test.php @@ -93,6 +93,21 @@ class CookieComponentTest extends CakeTestCase { $this->Controller->Cookie->destroy(); } +/** + * test that initialize sets settings from components array + * + * @return void + */ + function testInitialize() { + $settings = array( + 'time' => '5 days', + 'path' => '/' + ); + $this->Controller->Cookie->initialize($this->Controller, $settings); + $this->assertEqual($this->Controller->Cookie->time, $settings['time']); + $this->assertEqual($this->Controller->Cookie->path, $settings['path']); + } + /** * testCookieName *