From 9349425ecd93f21a9b23c1078a1fca0df02dc29a Mon Sep 17 00:00:00 2001 From: Alex Bilbie Date: Mon, 6 May 2013 10:28:49 -0700 Subject: [PATCH] Fixed ResourceServerTest.php --- tests/resource/ResourceServerTest.php | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/tests/resource/ResourceServerTest.php b/tests/resource/ResourceServerTest.php index 9e3ef6d8..b0bb830e 100644 --- a/tests/resource/ResourceServerTest.php +++ b/tests/resource/ResourceServerTest.php @@ -142,11 +142,16 @@ class Resource_Server_test extends PHPUnit_Framework_TestCase public function test_isValid_valid() { $this->session->shouldReceive('validateAccessToken')->andReturn(array( - 'id' => 1, - 'owner_type' => 'user', - 'owner_id' => 123 + 'session_id' => 1, + 'owner_type' => 'user', + 'owner_id' => 123, + 'client_id' => 'testapp' )); - $this->session->shouldReceive('getScopes')->andReturn(array('foo', 'bar')); + + $this->session->shouldReceive('getScopes')->andReturn(array( + array('key' => 'foo'), + array('key' => 'bar') + )); $request = new OAuth2\Util\Request(); $requestReflector = new ReflectionClass($request); @@ -155,6 +160,7 @@ class Resource_Server_test extends PHPUnit_Framework_TestCase $param->setValue($request, array( 'Authorization' => 'Bearer abcdef' )); + $s = $this->returnDefault(); $s->setRequest($request);