Example #1
0
 public function testInvoke()
 {
     $this->server->shouldReceive('issueAccessToken')->once()->andReturn(['accessToken' => 'foo']);
     $action = $this->action;
     /** @var Response $response */
     $response = $action($this->newTonisRequest('/'), $this->newTonisResponse());
     $this->assertInstanceOf(Response::class, $response);
     $this->assertSame(200, $response->getStatusCode());
     $this->assertContains('foo', (string) $response->getBody());
 }