From e14c4412fdd47085e5744cbb2a2605bd3d43507f Mon Sep 17 00:00:00 2001 From: Jose Lorenzo Rodriguez Date: Tue, 21 Jun 2011 15:08:27 -0430 Subject: [PATCH] Fixing more AuthComponent tests for Sqlsrv --- .../Case/Controller/Component/Auth/BasicAuthenticateTest.php | 3 ++- .../Case/Controller/Component/Auth/DigestAuthenticateTest.php | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/Cake/Test/Case/Controller/Component/Auth/BasicAuthenticateTest.php b/lib/Cake/Test/Case/Controller/Component/Auth/BasicAuthenticateTest.php index f0904fad2..5c7febfdc 100644 --- a/lib/Cake/Test/Case/Controller/Component/Auth/BasicAuthenticateTest.php +++ b/lib/Cake/Test/Case/Controller/Component/Auth/BasicAuthenticateTest.php @@ -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'); } diff --git a/lib/Cake/Test/Case/Controller/Component/Auth/DigestAuthenticateTest.php b/lib/Cake/Test/Case/Controller/Component/Auth/DigestAuthenticateTest.php index 12223e042..5fc81c90b 100644 --- a/lib/Cake/Test/Case/Controller/Component/Auth/DigestAuthenticateTest.php +++ b/lib/Cake/Test/Case/Controller/Component/Auth/DigestAuthenticateTest.php @@ -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');