Adding tests for component config setting from initialize()

This commit is contained in:
Mark Story 2009-12-16 22:57:04 -05:00
parent e45fcf4337
commit 5760f41124

View file

@ -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
*