Skip to content

Commit a884c4c

Browse files
committed
Merge branch '6.4' into 7.1
* 6.4: Use non-static PHPUnit assert methods
2 parents 2f8a9d6 + 421f42c commit a884c4c

File tree

2 files changed

+9
-9
lines changed

2 files changed

+9
-9
lines changed

components/clock.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -129,18 +129,18 @@ is expired or not, by modifying the clock's time::
129129
$validUntil = new DateTimeImmutable('2022-11-16 15:25:00');
130130

131131
// $validUntil is in the future, so it is not expired
132-
static::assertFalse($expirationChecker->isExpired($validUntil));
132+
$this->assertFalse($expirationChecker->isExpired($validUntil));
133133

134134
// Clock sleeps for 10 minutes, so now is '2022-11-16 15:30:00'
135135
$clock->sleep(600); // Instantly changes time as if we waited for 10 minutes (600 seconds)
136136

137137
// modify the clock, accepts all formats supported by DateTimeImmutable::modify()
138-
static::assertTrue($expirationChecker->isExpired($validUntil));
138+
$this->assertTrue($expirationChecker->isExpired($validUntil));
139139

140140
$clock->modify('2022-11-16 15:00:00');
141141

142142
// $validUntil is in the future again, so it is no longer expired
143-
static::assertFalse($expirationChecker->isExpired($validUntil));
143+
$this->assertFalse($expirationChecker->isExpired($validUntil));
144144
}
145145
}
146146

http_client.rst

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

23342334
// Assert
2335-
self::assertSame('POST', $mockResponse->getRequestMethod());
2336-
self::assertSame('https://example.com/api/article', $mockResponse->getRequestUrl());
2337-
self::assertContains(
2335+
$this->assertSame('POST', $mockResponse->getRequestMethod());
2336+
$this->assertSame('https://example.com/api/article', $mockResponse->getRequestUrl());
2337+
$this->assertContains(
23382338
'Content-Type: application/json',
23392339
$mockResponse->getRequestOptions()['headers']
23402340
);
2341-
self::assertSame($expectedRequestData, $mockResponse->getRequestOptions()['body']);
2341+
$this->assertSame($expectedRequestData, $mockResponse->getRequestOptions()['body']);
23422342

2343-
self::assertSame($responseData, $expectedResponseData);
2343+
$this->assertSame($responseData, $expectedResponseData);
23442344
}
23452345
}
23462346

@@ -2373,7 +2373,7 @@ test. Then, save that information as a ``.har`` file somewhere in your applicati
23732373
$responseData = $service->createArticle($requestData);
23742374

23752375
// Assert
2376-
self::assertSame($responseData, 'the expected response');
2376+
$this->assertSame($responseData, 'the expected response');
23772377
}
23782378
}
23792379

0 commit comments

Comments
 (0)