Fixes freezeSecond not being available in older Laravel versions.
This commit is contained in:
@@ -52,7 +52,7 @@ class CreatorTest extends TestCase
|
||||
{
|
||||
config(['webauthn.challenge.timeout' => 120]);
|
||||
|
||||
$this->freezeSecond();
|
||||
$this->travelTo(now()->startOfSecond());
|
||||
|
||||
$this->response()
|
||||
->assertSessionHas('_webauthn', static function (Challenge $challenge): bool {
|
||||
|
||||
@@ -55,7 +55,7 @@ class ValidationTest extends TestCase
|
||||
$this->validator = new AssertionValidator($this->app);
|
||||
$this->validation = new AssertionValidation($this->request);
|
||||
|
||||
$this->freezeSecond();
|
||||
$this->travelTo(now()->startOfSecond());
|
||||
|
||||
$this->challenge = new Challenge(
|
||||
new ByteBuffer(base64_decode(FakeAuthenticator::ASSERTION_CHALLENGE)), 60, false,
|
||||
|
||||
@@ -50,7 +50,7 @@ class CreatorTest extends TestCase
|
||||
|
||||
public function test_base_structure(): void
|
||||
{
|
||||
$this->freezeSecond();
|
||||
$this->travelTo(now()->startOfSecond());
|
||||
|
||||
$this->response()
|
||||
->assertSessionHas('_webauthn', function (Challenge $challenge): bool {
|
||||
|
||||
@@ -63,7 +63,7 @@ class ValidationTest extends TestCase
|
||||
$this->validator = new AttestationValidator($this->app);
|
||||
$this->validation = new AttestationValidation($this->user, $this->request);
|
||||
|
||||
$this->freezeSecond();
|
||||
$this->travelTo(now()->startOfSecond());
|
||||
|
||||
$this->challenge = new Challenge(
|
||||
new ByteBuffer(base64_decode(FakeAuthenticator::ATTESTATION_CHALLENGE)),
|
||||
|
||||
@@ -86,7 +86,7 @@ class WebAuthnCredentialTest extends TestCase
|
||||
|
||||
$credential = WebAuthnCredential::find(FakeAuthenticator::CREDENTIAL_ID);
|
||||
|
||||
$this->freezeSecond();
|
||||
$this->travelTo(now()->startOfSecond());
|
||||
|
||||
$credential->disable();
|
||||
$credential->disable();
|
||||
@@ -105,7 +105,7 @@ class WebAuthnCredentialTest extends TestCase
|
||||
|
||||
$credential = WebAuthnCredential::find('HLs22xpFT7ilSbYvbARFNf9Q3nVyfczTT9LFhtFT89D');
|
||||
|
||||
$this->freezeSecond();
|
||||
$this->travelTo(now()->startOfSecond());
|
||||
|
||||
$credential->enable();
|
||||
$credential->enable();
|
||||
|
||||
Reference in New Issue
Block a user