Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[6.5] Fixed tests #2720

Merged
merged 1 commit into from Jul 2, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion tests/ClientTest.php
Expand Up @@ -752,7 +752,7 @@ public function testIdnStaysTheSameWhenConversionIsDisabled()

/**
* @expectedException \GuzzleHttp\Exception\InvalidArgumentException
* @expectedExceptionMessage IDN conversion failed (errors: IDNA_ERROR_LEADING_HYPHEN)
* @expectedExceptionMessage IDN conversion failed
*/
public function testExceptionOnInvalidIdn()
{
Expand Down
15 changes: 0 additions & 15 deletions tests/Exception/RequestExceptionTest.php
Expand Up @@ -126,21 +126,6 @@ public function testExceptionMessageIgnoresEmptyBody()
self::assertStringEndsWith('response', $e->getMessage());
}

public function testCreatesExceptionWithoutPrintableBody()
{
$response = new Response(
500,
['Content-Type' => 'image/gif'],
$content = base64_decode('R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7') // 1x1 gif
);
$e = RequestException::create(new Request('GET', '/'), $response);
self::assertNotContains(
$content,
$e->getMessage()
);
self::assertInstanceOf('GuzzleHttp\Exception\RequestException', $e);
}

public function testHasStatusCodeAsExceptionCode()
{
$e = RequestException::create(new Request('GET', '/'), new Response(442));
Expand Down