Skip to content

Commit 93d5c5c

Browse files
Make sure that cleanup code is called
1 parent 2481e42 commit 93d5c5c

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

tests/unit/Framework/AssertTest.php

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -660,9 +660,10 @@ public function testAssertFileIsNotWritable(): void
660660

661661
chmod($tempFile, octdec('755'));
662662

663-
$this->expectException(AssertionFailedError::class);
664-
665-
$this->assertFileIsNotWritable($tempFile);
663+
try {
664+
$this->assertFileIsNotWritable($tempFile);
665+
} catch (AssertionFailedError $e) {
666+
}
666667

667668
unlink($tempFile);
668669
}

0 commit comments

Comments
 (0)