mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-01-31 09:06:17 +00:00
Fixing incorrect/failing test in Security component.
This commit is contained in:
parent
f5bebc9306
commit
59c692dbae
1 changed files with 8 additions and 7 deletions
|
@ -170,7 +170,7 @@ class SecurityComponentTest extends CakeTestCase {
|
|||
*
|
||||
* @return void
|
||||
*/
|
||||
function testInitialize() {
|
||||
function testConstructorSettingProperties() {
|
||||
$settings = array(
|
||||
'requirePost' => array('edit', 'update'),
|
||||
'requireSecure' => array('update_account'),
|
||||
|
@ -181,13 +181,14 @@ class SecurityComponentTest extends CakeTestCase {
|
|||
),
|
||||
'requireLogin' => array('login'),
|
||||
);
|
||||
$Security = new SecurityComponent($this->Controller->Components, $settings);
|
||||
$this->Controller->Security->initialize($this->Controller, $settings);
|
||||
$this->assertEqual($this->Controller->Security->requirePost, $settings['requirePost']);
|
||||
$this->assertEqual($this->Controller->Security->requireSecure, $settings['requireSecure']);
|
||||
$this->assertEqual($this->Controller->Security->requireGet, $settings['requireGet']);
|
||||
$this->assertEqual($this->Controller->Security->validatePost, $settings['validatePost']);
|
||||
$this->assertEqual($this->Controller->Security->loginUsers, $settings['loginUsers']);
|
||||
$this->assertEqual($this->Controller->Security->requireLogin, $settings['requireLogin']);
|
||||
$this->assertEqual($Security->requirePost, $settings['requirePost']);
|
||||
$this->assertEqual($Security->requireSecure, $settings['requireSecure']);
|
||||
$this->assertEqual($Security->requireGet, $settings['requireGet']);
|
||||
$this->assertEqual($Security->validatePost, $settings['validatePost']);
|
||||
$this->assertEqual($Security->loginUsers, $settings['loginUsers']);
|
||||
$this->assertEqual($Security->requireLogin, $settings['requireLogin']);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Add table
Reference in a new issue