diff --git a/lib/Cake/Test/Case/Controller/Component/Auth/BasicAuthenticateTest.php b/lib/Cake/Test/Case/Controller/Component/Auth/BasicAuthenticateTest.php index b43c50c22..19611674b 100644 --- a/lib/Cake/Test/Case/Controller/Component/Auth/BasicAuthenticateTest.php +++ b/lib/Cake/Test/Case/Controller/Component/Auth/BasicAuthenticateTest.php @@ -21,7 +21,7 @@ App::uses('CakeRequest', 'Network'); App::uses('CakeResponse', 'Network'); -require_once CAKE_TESTS . 'Case' . DS . 'Model' . DS . 'models.php'; +require_once CAKE . 'Test' . DS . 'Case' . DS . 'Model' . DS . 'models.php'; /** * Test case for BasicAuthentication @@ -100,7 +100,7 @@ class BasicAuthenticateTest extends CakeTestCase { function testAuthenticateNoUsername() { $request = new CakeRequest('posts/index', false); $_SERVER['PHP_AUTH_PW'] = 'foobar'; - + $this->response->expects($this->once()) ->method('header') ->with('WWW-Authenticate: Basic realm="localhost"'); @@ -117,7 +117,7 @@ class BasicAuthenticateTest extends CakeTestCase { $request = new CakeRequest('posts/index', false); $_SERVER['PHP_AUTH_USER'] = 'mariano'; $_SERVER['PHP_AUTH_PW'] = null; - + $this->response->expects($this->once()) ->method('header') ->with('WWW-Authenticate: Basic realm="localhost"'); @@ -152,10 +152,10 @@ class BasicAuthenticateTest extends CakeTestCase { $this->response->expects($this->at(0)) ->method('header') ->with('WWW-Authenticate: Basic realm="localhost"'); - + $this->response->expects($this->at(1)) ->method('send'); - + $result = $this->auth->authenticate($request, $this->response); $this->assertFalse($result); } @@ -201,11 +201,11 @@ class BasicAuthenticateTest extends CakeTestCase { $this->response->expects($this->at(1)) ->method('statusCode') ->with(401); - + $this->response->expects($this->at(2)) ->method('send'); $this->assertFalse($this->auth->authenticate($request, $this->response)); } -} \ No newline at end of file +} diff --git a/lib/Cake/Test/Case/Controller/Component/Auth/DigestAuthenticateTest.php b/lib/Cake/Test/Case/Controller/Component/Auth/DigestAuthenticateTest.php index 72047c5e8..373e8bcbc 100644 --- a/lib/Cake/Test/Case/Controller/Component/Auth/DigestAuthenticateTest.php +++ b/lib/Cake/Test/Case/Controller/Component/Auth/DigestAuthenticateTest.php @@ -19,7 +19,7 @@ App::uses('AppModel', 'Model'); App::uses('CakeRequest', 'Network'); App::uses('CakeResponse', 'Network'); -require_once CAKE_TESTS . 'Case' . DS . 'Model' . DS . 'models.php'; +require_once CAKE . 'Test' . DS . 'Case' . DS . 'Model' . DS . 'models.php'; /** * Test case for DigestAuthentication @@ -116,7 +116,7 @@ cnonce="0a4f113b", response="6629fae49393a05397450978507c4ef1", opaque="123abc" DIGEST; - + $this->response->expects($this->at(0)) ->method('header') ->with('WWW-Authenticate: Digest realm="localhost",qop="auth",nonce="123",opaque="123abc"'); @@ -124,7 +124,7 @@ DIGEST; $this->response->expects($this->at(1)) ->method('statusCode') ->with(401); - + $this->response->expects($this->at(2)) ->method('send'); @@ -143,14 +143,14 @@ DIGEST; $this->response->expects($this->at(0)) ->method('header') ->with('WWW-Authenticate: Digest realm="localhost",qop="auth",nonce="123",opaque="123abc"'); - + $this->response->expects($this->at(1)) ->method('statusCode') ->with(401); - + $this->response->expects($this->at(2)) ->method('send'); - + $result = $this->auth->authenticate($request, $this->response); $this->assertFalse($result); } @@ -211,11 +211,11 @@ DIGEST; $this->response->expects($this->at(0)) ->method('header') ->with('WWW-Authenticate: Digest realm="localhost",qop="auth",nonce="123",opaque="123abc"'); - + $this->response->expects($this->at(1)) ->method('statusCode') ->with(401); - + $this->response->expects($this->at(2)) ->method('send'); @@ -300,4 +300,4 @@ DIGEST; $expected = md5('mark:localhost:password'); $this->assertEquals($expected, $result); } -} \ No newline at end of file +} diff --git a/lib/Cake/Test/Case/Controller/Component/Auth/FormAuthenticate.php b/lib/Cake/Test/Case/Controller/Component/Auth/FormAuthenticate.php index 0af5d0193..384b73fb0 100644 --- a/lib/Cake/Test/Case/Controller/Component/Auth/FormAuthenticate.php +++ b/lib/Cake/Test/Case/Controller/Component/Auth/FormAuthenticate.php @@ -20,7 +20,7 @@ App::uses('AppModel', 'Model'); App::uses('CakeRequest', 'Network'); App::uses('CakeResponse', 'Network'); -require_once CAKE_TESTS . 'Case' . DS . 'Model' . DS . 'models.php'; +require_once CAKE . 'Test' . DS . 'Case' . DS . 'Model' . DS . 'models.php'; /** * Test case for FormAuthentication diff --git a/lib/Cake/bootstrap.php b/lib/Cake/bootstrap.php index 741d8ab40..471ded4fc 100644 --- a/lib/Cake/bootstrap.php +++ b/lib/Cake/bootstrap.php @@ -75,13 +75,6 @@ if (!defined('TESTS')) { define('TESTS', APP.'Test'.DS); } -/** - * Path to the core tests directory. - */ -if (!defined('CAKE_TESTS')) { - define('CAKE_TESTS', CAKE.'Test'.DS); -} - /** * Path to the temporary files directory. */