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

Commit 9c62b01

Browse files
committed
minor #37773 Modernized deprecated PHPUnit assertion calls (derrabus)
This PR was squashed before being merged into the 3.4 branch. Discussion ---------- Modernized deprecated PHPUnit assertion calls | Q | A | ------------- | --- | Branch? | 3.4 | Bug fix? | yes | New feature? | no | Deprecations? | no | Tickets | Part of #37564 | License | MIT | Doc PR | N/A Some assertions have been renamed in PHPUnit 9. PhpUnitBridge should already have polyfills in place for those methods, so it should be save to use them. Commits ------- ab417f7040 Modernized deprecated PHPUnit assertion calls
2 parents eb0d422 + 4d5cf38 commit 9c62b01

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

Http/Tests/EntryPoint/DigestAuthenticationEntryPointTest.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ public function testStart()
3131
$response = $entryPoint->start($request, $authenticationException);
3232

3333
$this->assertEquals(401, $response->getStatusCode());
34-
$this->assertRegExp('/^Digest realm="TheRealmName", qop="auth", nonce="[a-zA-Z0-9\/+]+={0,2}"$/', $response->headers->get('WWW-Authenticate'));
34+
$this->assertMatchesRegularExpression('/^Digest realm="TheRealmName", qop="auth", nonce="[a-zA-Z0-9\/+]+={0,2}"$/', $response->headers->get('WWW-Authenticate'));
3535
}
3636

3737
public function testStartWithNoException()
@@ -42,7 +42,7 @@ public function testStartWithNoException()
4242
$response = $entryPoint->start($request);
4343

4444
$this->assertEquals(401, $response->getStatusCode());
45-
$this->assertRegExp('/^Digest realm="TheRealmName", qop="auth", nonce="[a-zA-Z0-9\/+]+={0,2}"$/', $response->headers->get('WWW-Authenticate'));
45+
$this->assertMatchesRegularExpression('/^Digest realm="TheRealmName", qop="auth", nonce="[a-zA-Z0-9\/+]+={0,2}"$/', $response->headers->get('WWW-Authenticate'));
4646
}
4747

4848
public function testStartWithNonceExpiredException()
@@ -55,6 +55,6 @@ public function testStartWithNonceExpiredException()
5555
$response = $entryPoint->start($request, $nonceExpiredException);
5656

5757
$this->assertEquals(401, $response->getStatusCode());
58-
$this->assertRegExp('/^Digest realm="TheRealmName", qop="auth", nonce="[a-zA-Z0-9\/+]+={0,2}", stale="true"$/', $response->headers->get('WWW-Authenticate'));
58+
$this->assertMatchesRegularExpression('/^Digest realm="TheRealmName", qop="auth", nonce="[a-zA-Z0-9\/+]+={0,2}", stale="true"$/', $response->headers->get('WWW-Authenticate'));
5959
}
6060
}

0 commit comments

Comments
 (0)