Skip to content

Commit c3b8472

Browse files
derrabusfabpot
authored andcommitted
Modernized deprecated PHPUnit assertion calls
1 parent 40f7beb commit c3b8472

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

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)