Skip to content

Commit

Permalink
Silence errors on unlink for when tests are run in parallel.
Browse files Browse the repository at this point in the history
  • Loading branch information
Danack committed Jul 3, 2024
1 parent b8bbf06 commit ac9d4f4
Show file tree
Hide file tree
Showing 7 changed files with 17 additions and 7 deletions.
2 changes: 1 addition & 1 deletion tests/013-read-filehandle-file-stream.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ $imagick->readImageFile($handle);
echo "Width: " . $imagick->getImageWidth() . "\n";
echo "Height: " . $imagick->getImageHeight() . "\n";

unlink($file);
@unlink($file);

echo 'success';

Expand Down
2 changes: 1 addition & 1 deletion tests/013-read-filehandle.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ $imagick->clear();
$handle = fopen($file, 'rb');
$imagick->readImageFile($handle);

unlink($file);
@unlink($file);

echo 'success';

Expand Down
4 changes: 3 additions & 1 deletion tests/031_Imagick_affineTransformImage_basic.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,9 @@ echo "Ok";
--CLEAN--
<?php
$f = __DIR__ . "/test_031.png";
if (file_exists($f)) unlink($f);
if (file_exists($f)) {
@unlink($f);
}
?>
--EXPECTF--
Checking white
Expand Down
4 changes: 3 additions & 1 deletion tests/257_Imagick_setImageChannelMask_basic.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,9 @@ echo "Ok";
--CLEAN--
<?php
$f = __DIR__ . '/maskTest.png';
if (file_exists($f)) unlink($f);
if (file_exists($f)) {
unlink($f);
}
?>
--EXPECTF--
Ok
4 changes: 3 additions & 1 deletion tests/264_ImagickDraw_getTextDirection_basic.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,9 @@ echo "Ok";
--CLEAN--
<?php
$f = __DIR__ . '/directionTest.png';
if (file_exists($f)) unlink($f);
if (file_exists($f)) {
unlink($f);
}
?>
--EXPECTF--
Ok
4 changes: 3 additions & 1 deletion tests/274_imagick_setImageAlpha.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,9 @@ echo "Ok";
--CLEAN--
<?php
$f = __DIR__ . '/setAlphaTest.png';
if (file_exists($f)) unlink($f);
if (file_exists($f)) {
@unlink($f);
}
?>
--EXPECTF--
Ok
4 changes: 3 additions & 1 deletion tests/281_imagick_houghLineImage_basic.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,9 @@ echo "Ok";
--CLEAN--
<?php
$f = __DIR__ . '/houghline_output_image.png';
if (file_exists($f)) unlink($f);
if (file_exists($f)) {
@unlink($f);
}
?>
--EXPECTF--
Ok

0 comments on commit ac9d4f4

Please sign in to comment.