From fd9ffa0ceea6eb8fea682440f575443f7fb52455 Mon Sep 17 00:00:00 2001 From: Florian Pritz Date: Sat, 20 Aug 2016 12:59:31 +0200 Subject: Test \libraries\Image some more Signed-off-by: Florian Pritz --- application/test/tests/test_libraries_image.php | 15 +++++++++++++++ 1 file changed, 15 insertions(+) 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"); + } + } + } -- cgit v1.2.3-24-g4f1b