/** * @test * @group jwt */ public function hasScopeShouldReturnTrueWhenTokenContainsMatchingEntryWithArbitraryNesting() { $this->request->shouldReceive('header')->with('Authorization')->andReturn('Bearer abcd1234'); $this->jwtPartialMock->shouldReceive('read')->once()->andReturn(array('scopes' => array('api' => array('role' => array('actions' => array('read')))))); $this->assertTrue($this->jwtPartialMock->hasScope(array('something.else.entirely', 'api.role.actions.read'), $this->request)); }