diff options
author | Florian Pritz <bluewind@xinu.at> | 2016-08-20 12:59:31 +0200 |
---|---|---|
committer | Florian Pritz <bluewind@xinu.at> | 2016-08-20 12:59:31 +0200 |
commit | fd9ffa0ceea6eb8fea682440f575443f7fb52455 (patch) | |
tree | 8ce88d1a645b9576f38eb94457ab53ebf237219d /application | |
parent | a184be45fdd14e6e460f10768a5cc7282a357b8e (diff) |
Test \libraries\Image some more
Signed-off-by: Florian Pritz <bluewind@xinu.at>
Diffstat (limited to 'application')
-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"); + } + } + } |