Ejemplo n.º 1
0
 public function testGetByAccessToken_Invalid()
 {
     $user = $this->createUser();
     $this->user_service->save($user);
     $mock_plugin = new \Guzzle\Plugin\Mock\MockPlugin();
     $mock_plugin->addResponse(new \Guzzle\Http\Message\Response(200, [], json_encode(['id' => 2])));
     $this->http->addSubscriber($mock_plugin);
     $this->assertNull($this->user_service->getByAccessToken('invalid_token'));
 }