Permalink
Browse files

Fixing failing tests in AuthComponent because of required parameter.

  • Loading branch information...
1 parent 22cf13b commit c669f8c998b0649483a411615ffb69423d38cd04 @markstory markstory committed Dec 20, 2009
View
2 cake/libs/controller/components/auth.php
@@ -253,7 +253,7 @@ class AuthComponent extends Object {
* @return void
* @access public
*/
- function initialize(&$controller, $settings) {
+ function initialize(&$controller, $settings = array()) {
$this->params = $controller->params;
$crud = array('create', 'read', 'update', 'delete');
$this->actionMap = array_merge($this->actionMap, array_combine($crud, $crud));
View
4 cake/tests/cases/libs/controller/components/auth.test.php
@@ -1513,7 +1513,7 @@ function testComponentSettings() {
'fields' => array('username' => 'email', 'password' => 'password'),
'loginAction' => array('controller' => 'people', 'action' => 'login'),
'userModel' => 'AuthUserCustomField',
- 'sessionKey' => 'AltAuth'
+ 'sessionKey' => 'AltAuth.AuthUserCustomField'
)
);
$this->Controller->Component->init($this->Controller);
@@ -1540,7 +1540,7 @@ function testComponentSettings() {
$user = $this->Controller->Auth->user();
$this->assertTrue(!!$user);
-
+
$expected = array(
'fields' => array('username' => 'email', 'password' => 'password'),
'loginAction' => array('controller' => 'people', 'action' => 'login'),

0 comments on commit c669f8c

Please sign in to comment.