Skip to content

Commit

Permalink
Add test for readImages
Browse files Browse the repository at this point in the history
  • Loading branch information
mkoppanen committed Sep 30, 2013
1 parent 665f39a commit 8a65038
Showing 1 changed file with 47 additions and 0 deletions.
47 changes: 47 additions & 0 deletions tests/019-readimages.phpt
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
--TEST--
Imagick::readImages
--SKIPIF--
<?php require_once(dirname(__FILE__) . '/skipif.inc'); ?>
--FILE--
<?php

try {
$imagick = new Imagick(array (
'magick:rose',
'magick:rose',
'fail_this_does_not_exist.jpg',
'magick:rose',
));
echo 'Fail'. PHP_EOL;
} catch (ImagickException $e) {
echo 'OK' . PHP_EOL;
}

try {
$imagick = new Imagick(array (
'magick:rose',
'magick:rose',
'magick:rose',
));
echo 'OK' . PHP_EOL;
$imagick->readImages (array (
'magick:rose',
'magick:rose',
'magick:rose',
));
echo 'OK' . PHP_EOL;
$imagick->readImages (array (
'magick:rose',
'fail_this_does_not_exist.jpg',
));
echo 'Fail' . PHP_EOL;
} catch (ImagickException $e) {
echo 'Third OK'. PHP_EOL;
}

?>
--EXPECT--
OK
OK
OK
Third OK

0 comments on commit 8a65038

Please sign in to comment.