Permalink
Browse files

Adding tests for component config setting from initialize()

  • Loading branch information...
1 parent e45fcf4 commit 5760f41124e899edba9f49d533a7a7ad3652a0ed @markstory markstory committed Dec 17, 2009
Showing with 15 additions and 0 deletions.
  1. +15 −0 cake/tests/cases/libs/controller/components/cookie.test.php
View
15 cake/tests/cases/libs/controller/components/cookie.test.php
@@ -94,6 +94,21 @@ function end() {
}
/**
+ * 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
*
* @access public

0 comments on commit 5760f41

Please sign in to comment.