Skip to content

Commit c88d3c4

Browse files
cuppettCopilot
andcommitted
Fix expected failure assertion in S3EncryptionModesLiveTest
Ensure test fails if reading object does not throw an exception. Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> Signed-off-by: Stephen Cuppett <steve@cuppett.com>
1 parent 8471d82 commit c88d3c4

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

‎tests/lib/Files/ObjectStore/S3EncryptionModesLiveTest.php‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,14 +138,15 @@ private function assertReadFails(S3 $s3, string $urn): void {
138138
return true;
139139
});
140140
stream_get_contents($s3->readObject($urn));
141-
$this->fail("Expected reading '$urn' to fail");
142141
} catch (\Exception) {
143142
foreach ($warnings as $warning) {
144143
$this->assertStringStartsWith('fopen(', $warning);
145144
}
145+
return;
146146
} finally {
147147
restore_error_handler();
148148
}
149+
$this->fail("Expected reading '$urn' to fail");
149150
}
150151

151152
// --- Per-mode matrix -----------------------------------------------------------------

0 commit comments

Comments
 (0)