Skip to content

Commit 6f41e7f

Browse files
committed
Fix: ignore discarded return values during unit-testing
1 parent dd9c5f1 commit 6f41e7f

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

tests/XML/SignedElementTest.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -195,6 +195,7 @@ public function testVerifyingTamperedSignatureWithoutKeyFails(): void
195195
$this->expectException(RuntimeException::class);
196196
$this->expectExceptionMessage('Failed to verify signature.');
197197

198+
// Value cannot be ignored due to NoDiscard-attribute
198199
$verified = $customSigned->verify();
199200
}
200201

@@ -217,7 +218,9 @@ public function testVerifyingTamperedSignatureWithKeyFails(): void
217218

218219
$this->expectException(RuntimeException::class);
219220
$this->expectExceptionMessage('Failed to verify signature.');
220-
$customSigned->verify($verifier);
221+
222+
// Value cannot be ignored due to NoDiscard-attribute
223+
$verified = $customSigned->verify($verifier);
221224
}
222225

223226

0 commit comments

Comments
 (0)