Skip to content

Commit

Permalink
Test new accessors on v1 format
Browse files Browse the repository at this point in the history
  • Loading branch information
Firehed committed Nov 21, 2023
1 parent f57081b commit 8ae52e7
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/CredentialV1.php
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ public function isUvInitialized(): bool
return false;
}

public function getAttestationData(): null
public function getAttestationData(): ?array
{
return null;
}
Expand Down
6 changes: 6 additions & 0 deletions tests/CredentialV1Test.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 8ae52e7

Please sign in to comment.