mirror of
				https://github.com/elyby/oauth2-server.git
				synced 2025-05-31 14:12:07 +05:30 
			
		
		
		
	Fixed ResourceServerTest.php
This commit is contained in:
		@@ -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);
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user