Skip to content
This repository was archived by the owner on Jan 6, 2024. It is now read-only.

Commit c4bf1ab

Browse files
committed
Allow to skip tests
1 parent 9a04a72 commit c4bf1ab

File tree

1 file changed

+39
-0
lines changed

1 file changed

+39
-0
lines changed

tests/ClientTest.php

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,4 +27,43 @@ protected function shouldBeSkip($method, $uri, array $headers, $body)
2727

2828
return false;
2929
}
30+
31+
/**
32+
* @dataProvider requestProvider
33+
* @group integration
34+
*/
35+
public function testSendRequest($method, $uri, array $headers, $body)
36+
{
37+
if (($reason = $this->shouldBeSkip($method, $uri, $headers, $body)) !== false) {
38+
self::markTestSkipped($reason);
39+
}
40+
41+
parent::testSendRequest(
42+
$method,
43+
$uri,
44+
$headers,
45+
$body
46+
);
47+
}
48+
/**
49+
* @dataProvider requestWithOutcomeProvider
50+
* @group integration
51+
*/
52+
public function testSendRequestWithOutcome(
53+
$uriAndOutcome,
54+
$protocolVersion,
55+
array $headers,
56+
$body
57+
) {
58+
if (($reason = $this->shouldBeSkip('GET', $uriAndOutcome[0], $headers, $body)) !== false) {
59+
self::markTestSkipped($reason);
60+
}
61+
62+
parent::testSendRequestWithOutcome(
63+
$uriAndOutcome,
64+
$protocolVersion,
65+
$headers,
66+
$body
67+
);
68+
}
3069
}

0 commit comments

Comments
 (0)