Amp\ArtaxTest\ClientHttpBinIntegrationTest::testReason PHP Method

testReason() public method

public testReason ( )
    public function testReason()
    {
        $uri = "http://httpbin.org/status/418";
        $client = new Client();
        $promise = $client->request($uri);
        $response = \Amp\wait($promise);
        $this->assertInstanceOf('Amp\\Artax\\Response', $response);
        $expectedReason = "I'M A TEAPOT";
        $actualReason = $response->getReason();
        $this->assertSame($expectedReason, $actualReason);
    }