From 8ae52e71b56857fb2d8ce0111097cb2784d88eb4 Mon Sep 17 00:00:00 2001 From: Eric Stern Date: Mon, 20 Nov 2023 15:59:30 -0800 Subject: [PATCH] Test new accessors on v1 format --- src/CredentialV1.php | 2 +- tests/CredentialV1Test.php | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/src/CredentialV1.php b/src/CredentialV1.php index d5ae2c9..bf1193c 100644 --- a/src/CredentialV1.php +++ b/src/CredentialV1.php @@ -71,7 +71,7 @@ public function isUvInitialized(): bool return false; } - public function getAttestationData(): null + public function getAttestationData(): ?array { return null; } diff --git a/tests/CredentialV1Test.php b/tests/CredentialV1Test.php index aff2c64..ce50dbf 100644 --- a/tests/CredentialV1Test.php +++ b/tests/CredentialV1Test.php @@ -28,6 +28,12 @@ public function testAccessors(): void // This test is flexible...storageId needs to be kept stable but the // pre-1.0 version could change before final release self::assertSame('ffff', $credential->getStorageId(), 'Storage ID wrong'); + + self::assertFalse($credential->isBackupEligible(), 'Backup tracking not in format'); + self::assertFalse($credential->isBackedUp(), 'Backup tracking not in format'); + self::assertFalse($credential->isUvInitialized(), 'UV tracking not in format'); + self::assertSame([], $credential->getTransports(), 'Transport tracking not in format'); + self::assertNull($credential->getAttestationData(), 'Attestation tracking not in format'); } public function testUpdatingSignCount(): void