Skip to content

Commit

Permalink
Adding tests for component config setting from initialize()
Browse files Browse the repository at this point in the history
  • Loading branch information
markstory committed Dec 17, 2009
1 parent e45fcf4 commit 5760f41
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions cake/tests/cases/libs/controller/components/cookie.test.php
Expand Up @@ -93,6 +93,21 @@ function end() {
$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
*
Expand Down

0 comments on commit 5760f41

Please sign in to comment.