Skip to content

Commit 31237a4

Browse files
committed
Fix: ignore discarded return values during unit-testing
1 parent 640364f commit 31237a4

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

tests/XML/SignedElementTest.php

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,9 @@ public function testVerifyingTamperedSignatureWithoutKeyFails(): void
194194

195195
$this->expectException(RuntimeException::class);
196196
$this->expectExceptionMessage('Failed to verify signature.');
197-
$customSigned->verify();
197+
198+
// Value cannot be ignored due to NoDiscard-attribute
199+
$verified = $customSigned->verify();
198200
}
199201

200202

@@ -216,7 +218,9 @@ public function testVerifyingTamperedSignatureWithKeyFails(): void
216218

217219
$this->expectException(RuntimeException::class);
218220
$this->expectExceptionMessage('Failed to verify signature.');
219-
$customSigned->verify($verifier);
221+
222+
// Value cannot be ignored due to NoDiscard-attribute
223+
$verified = $customSigned->verify($verifier);
220224
}
221225

222226

0 commit comments

Comments
 (0)