From 29ca5ff9a7b02356ef2a178c8e750822d316c78b Mon Sep 17 00:00:00 2001 From: Sam Minnee Date: Tue, 19 Oct 2010 01:26:09 +0000 Subject: [PATCH] BUGFIX: disable basic auth for the restful controller test (from r109714) git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@112829 467b73ca-7a2a-4603-9d3b-597d59a354a9 --- tests/api/RestfulServiceTest.php | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/tests/api/RestfulServiceTest.php b/tests/api/RestfulServiceTest.php index 2ad7adef1..76f943a4a 100644 --- a/tests/api/RestfulServiceTest.php +++ b/tests/api/RestfulServiceTest.php @@ -135,9 +135,12 @@ class RestfulServiceTest extends SapphireTest { } class RestfulServiceTest_Controller extends Controller { + public function init() { + $this->basicAuthEnabled = false; + parent::init(); + } + public function index() { - BasicAuth::protect_entire_site(false); - $request = ''; foreach ($this->request->requestVars() as $key=>$value) { $request .= "\t\t$value\n"; @@ -168,7 +171,6 @@ XML; } public function invalid() { - BasicAuth::protect_entire_site(false); $out = <<