diff options
Diffstat (limited to 'application/test')
-rw-r--r-- | application/test/tests/test_libraries_image.php | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/application/test/tests/test_libraries_image.php b/application/test/tests/test_libraries_image.php index 6891e8d22..99a963dea 100644 --- a/application/test/tests/test_libraries_image.php +++ b/application/test/tests/test_libraries_image.php @@ -81,5 +81,20 @@ class test_libraries_image extends \test\Test { } } + public function test_makeThumb_differentOrientation() + { + foreach ([1,2,3,4,5,6,7,8] as $orientation) { + $img = new \libraries\Image(FCPATH."/data/tests/exif-orientation-examples/Landscape_$orientation.jpg"); + $img->makeThumb(100, 100); + $thumb = $img->get(); + $this->t->ok($thumb != '', "Got thumbnail for Landscape_$orientation.jpg"); + + $img = new \libraries\Image(FCPATH."/data/tests/exif-orientation-examples/Portrait_$orientation.jpg"); + $img->makeThumb(100, 100); + $thumb = $img->get(); + $this->t->ok($thumb != '', "Got thumbnail for Portrait_$orientation.jpg"); + } + } + } |