mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-01-19 11:06:15 +00:00
Adding tests for component config setting from initialize()
This commit is contained in:
parent
e45fcf4337
commit
5760f41124
1 changed files with 15 additions and 0 deletions
|
@ -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
|
||||
*
|
||||
|
|
Loading…
Add table
Reference in a new issue