Fixing more AuthComponent tests for Sqlsrv

This commit is contained in:
Jose Lorenzo Rodriguez 2011-06-21 15:08:27 -04:30
parent 9f1242492d
commit e14c4412fd
2 changed files with 4 additions and 2 deletions

View file

@ -47,7 +47,8 @@ class BasicAuthenticateTest extends CakeTestCase {
));
$password = Security::hash('password', null, true);
ClassRegistry::init('User')->updateAll(array('password' => '"' . $password . '"'));
$User = ClassRegistry::init('User');
$User->updateAll(array('password' => $User->getDataSource()->value($password)));
$this->server = $_SERVER;
$this->response = $this->getMock('CakeResponse');
}

View file

@ -48,7 +48,8 @@ class DigestAuthenticateTest extends CakeTestCase {
));
$password = DigestAuthenticate::password('mariano', 'cake', 'localhost');
ClassRegistry::init('User')->updateAll(array('password' => '"' . $password . '"'));
$User = ClassRegistry::init('User');
$User->updateAll(array('password' => $User->getDataSource()->value($password)));
$_SERVER['REQUEST_METHOD'] = 'GET';
$this->response = $this->getMock('CakeResponse');