Skip to content

Commit

Permalink
Fixing tests so they run in the webrunner.
Browse files Browse the repository at this point in the history
  • Loading branch information
markstory committed Feb 4, 2011
1 parent 0e7f490 commit 91a3fc4
Showing 1 changed file with 4 additions and 2 deletions.
Expand Up @@ -38,6 +38,7 @@ class DigestAuthenticateTest extends CakeTestCase {
*/
function setUp() {
parent::setUp();
$this->server = $_SERVER;
$this->auth = new DigestAuthenticate(array(
'fields' => array('username' => 'user', 'password' => 'password'),
'userModel' => 'User',
Expand All @@ -48,7 +49,8 @@ function setUp() {

$password = DigestAuthenticate::password('mariano', 'localhost', 'cake');
ClassRegistry::init('User')->updateAll(array('password' => '"' . $password . '"'));
$this->server = $_SERVER;

$_SERVER['REQUEST_METHOD'] = 'GET';
$this->response = $this->getMock('CakeResponse');
}

Expand Down Expand Up @@ -170,7 +172,7 @@ function testAuthenticateSuccess() {
qop=auth,
nc=1,
cnonce="123",
response="5e064cc2f3b20894a806b2de3edf9536",
response="06b257a54befa2ddfb9bfa134224aa29",
opaque="123abc"
DIGEST;

Expand Down

0 comments on commit 91a3fc4

Please sign in to comment.