Skip to content

Commit f26c8f4

Browse files
committed
Level 2
1 parent a02bb57 commit f26c8f4

File tree

4 files changed

+10
-4
lines changed

4 files changed

+10
-4
lines changed

phpstan.neon

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@ parameters:
1818
- '/Parameter #2 \$eventName of method Symfony\\Contracts\\EventDispatcher\\EventDispatcherInterface::dispatch\(\) expects string\|null, VCR\\Event\\Event given./'
1919
# PHPStan cannot deal with manually defined constants - can be removed once php 7.2 no longer supported
2020
- '#Constant CURLPROXY_HTTPS not found.#'
21+
- '#Call to an undefined method (VCR\\Util\\|)SoapClient::GetCityWeatherByZIP\(\)\.#'
22+
- '#Call to an undefined method org\\bovigo\\vfs\\vfsStreamContent::hasChild\(\)\.#'
2123
includes:
2224
- vendor/thecodingmachine/phpstan-strict-rules/phpstan-strict-rules.neon
2325
- vendor/phpstan/phpstan-beberlei-assert/extension.neon

tests/VCR/LibraryHooks/SoapHookTest.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ public function testShouldInterceptCallWhenEnabled(): void
3434
{
3535
$this->soapHook->enable($this->getContentCheckCallback());
3636

37+
/** @var \VCR\Util\SoapClient $client */
3738
$client = new \SoapClient(self::WSDL, ['soap_version' => \SOAP_1_2]);
3839
$client->setLibraryHook($this->soapHook);
3940
$actual = $client->GetCityWeatherByZIP(['ZIP' => '10013']);
@@ -51,6 +52,7 @@ public function testShouldHandleSOAPVersion11(): void
5152
];
5253
$this->soapHook->enable($this->getHeadersCheckCallback($expectedHeaders));
5354

55+
/** @var \VCR\Util\SoapClient $client */
5456
$client = new \SoapClient(
5557
self::WSDL,
5658
['soap_version' => \SOAP_1_1]
@@ -67,6 +69,7 @@ public function testShouldHandleSOAPVersion12(): void
6769

6870
$this->soapHook->enable($this->getHeadersCheckCallback($expectedHeaders));
6971

72+
/** @var \VCR\Util\SoapClient $client */
7073
$client = new \SoapClient(
7174
self::WSDL,
7275
['soap_version' => \SOAP_1_2]
@@ -79,6 +82,7 @@ public function testShouldReturnLastRequestWithTraceOn(): void
7982
{
8083
$this->soapHook->enable($this->getContentCheckCallback());
8184

85+
/** @var \VCR\Util\SoapClient $client */
8286
$client = new \SoapClient(
8387
self::WSDL,
8488
['soap_version' => \SOAP_1_1, 'trace' => 1]

tests/VCR/Util/CurlHelperTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -213,7 +213,7 @@ public function testHandleResponseReturnsBody(): void
213213

214214
$output = CurlHelper::handleOutput($response, $curlOptions, curl_init());
215215

216-
$this->assertEquals($response->getBody(true), $output);
216+
$this->assertEquals($response->getBody(), $output);
217217
}
218218

219219
public function testHandleResponseEchosBody(): void
@@ -224,7 +224,7 @@ public function testHandleResponseEchosBody(): void
224224
CurlHelper::handleOutput($response, [], curl_init());
225225
$output = ob_get_clean();
226226

227-
$this->assertEquals($response->getBody(true), $output);
227+
$this->assertEquals($response->getBody(), $output);
228228
}
229229

230230
public function testHandleResponseIncludesHeader(): void

tests/VCR/Util/StreamHelperTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,8 +74,8 @@ function (Request $request) use ($test): void {
7474
/**
7575
* @dataProvider streamContexts
7676
*
77-
* @param $context
78-
* @param $testCallback
77+
* @param array $context
78+
* @param callable $testCallback
7979
*/
8080
public function testStreamHttpContext($context, $testCallback): void
8181
{

0 commit comments

Comments
 (0)