Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion tests/EcdsaP256Test.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ public function testSignAndVerifyRoundTripWithRawSignature(): void

fact($envelope->verify($verifier))->is('the payload');
// Raw r||s encoding for P-256 is exactly 64 bytes (DER would be variable-length).
fact(strlen($envelope->signatures[0]->sig))->is(64);
fact($envelope->signatures[0]->sig)->hasLength(64);
}

public function testVerifiesNativeDerSignature(): void
Expand Down
2 changes: 1 addition & 1 deletion tests/EcdsaP384Test.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ public function testSignAndVerifyRoundTripWithRawSignature(): void

fact($envelope->verify(EcdsaP384Verifier::fromPem($publicPem)))->is('the payload');
// Raw r||s for P-384 is exactly 96 bytes.
fact(strlen($envelope->signatures[0]->sig))->is(96);
fact($envelope->signatures[0]->sig)->hasLength(96);
}

public function testVerifiesNativeDerSignature(): void
Expand Down
2 changes: 1 addition & 1 deletion tests/EcdsaP521Test.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ public function testSignAndVerifyRoundTripWithRawSignature(): void

fact($envelope->verify(EcdsaP521Verifier::fromPem($publicPem)))->is('the payload');
// Raw r||s for P-521 is exactly 132 bytes (66 per coordinate).
fact(strlen($envelope->signatures[0]->sig))->is(132);
fact($envelope->signatures[0]->sig)->hasLength(132);
}

public function testVerifiesNativeDerSignature(): void
Expand Down
2 changes: 1 addition & 1 deletion tests/EnvelopeTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ public function testParsesAndReEmitsTheOfficialExampleEnvelope(): void

fact($envelope->payload)->is('hello world');
fact($envelope->payloadType)->is('http://example.com/HelloWorld');
fact(count($envelope->signatures))->is(1);
fact($envelope->signatures)->count(1);
fact($envelope->toJson())->is(self::EXAMPLE_JSON);
}

Expand Down