Skip to content

Commit 0f93c9a

Browse files
committed
Libs(PHP): doc and disable warning in test suite
We've got some test that check that verify() doesn't throw an exception, but that function doesn't return anything so we can't assert anything about the outcome. To hush the warnings in the test suite we have to explicitly tell it "we don't expect to make any assertions."
1 parent 85ba23d commit 0f93c9a

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

php/tests/WebhookTest.php

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,10 @@ public function testNewTimestampThrowsException()
112112

113113
public function testMultiSigPayloadIsValid()
114114
{
115+
// We're checking that `verify()` doesn't throw an exception.
116+
// It doesn't return anything we can assert about.
117+
$this->expectNotToPerformAssertions();
118+
115119
$testPayload = new TestPayload(time());
116120
$sigs = [
117121
"v1,Ceo5qEr07ixe2NLpvHk3FH9bwy/WavXrAFQ/9tdO6mc=",
@@ -127,6 +131,10 @@ public function testMultiSigPayloadIsValid()
127131

128132
public function testSignatureVerificationWithAndWithoutPrefix()
129133
{
134+
// We're checking that `verify()` doesn't throw an exception.
135+
// It doesn't return anything we can assert about.
136+
$this->expectNotToPerformAssertions();
137+
130138
$testPayload = new TestPayload(time());
131139

132140
$wh = new \Svix\Webhook($testPayload->secret);

0 commit comments

Comments
 (0)