Google\Cloud\Tests\RequestWrapperTest::testExceptionMessageIsNotTruncatedWithGuzzle PHP Method

testExceptionMessageIsNotTruncatedWithGuzzle() public method

    public function testExceptionMessageIsNotTruncatedWithGuzzle()
    {
        $requestWrapper = new RequestWrapper(['httpHandler' => function ($request, $options = []) {
            $msg = str_repeat('0', 121);
            throw new RequestException($msg, $request, new Response(400, [], $msg));
        }]);
        try {
            $requestWrapper->send(new Request('GET', 'http://www.example.com'));
        } catch (\Exception $ex) {
            $this->assertTrue(strlen($ex->getMessage()) > 120);
        }
    }