Skip to content

Commit fa4043b

Browse files
committed
Use non-static PHPUnit assert methods
1 parent 56dfb87 commit fa4043b

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

http_client.rst

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2225,15 +2225,15 @@ test it in a real application::
22252225
$responseData = $service->createArticle($requestData);
22262226

22272227
// Assert
2228-
self::assertSame('POST', $mockResponse->getRequestMethod());
2229-
self::assertSame('https://example.com/api/article', $mockResponse->getRequestUrl());
2230-
self::assertContains(
2228+
$this->assertSame('POST', $mockResponse->getRequestMethod());
2229+
$this->assertSame('https://example.com/api/article', $mockResponse->getRequestUrl());
2230+
$this->assertContains(
22312231
'Content-Type: application/json',
22322232
$mockResponse->getRequestOptions()['headers']
22332233
);
2234-
self::assertSame($expectedRequestData, $mockResponse->getRequestOptions()['body']);
2234+
$this->assertSame($expectedRequestData, $mockResponse->getRequestOptions()['body']);
22352235

2236-
self::assertSame($responseData, $expectedResponseData);
2236+
$this->assertSame($responseData, $expectedResponseData);
22372237
}
22382238
}
22392239

testing.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1027,7 +1027,7 @@ Browser Assertions
10271027
// add this method in some custom class imported in your tests
10281028
protected static function assertMyOwnCustomAssert(): void
10291029
{
1030-
self::assertThatForClient(new SomeCustomConstraint());
1030+
$this->assertThatForClient(new SomeCustomConstraint());
10311031
}
10321032

10331033
Crawler Assertions

0 commit comments

Comments
 (0)