summaryrefslogtreecommitdiffstats
path: root/application/test/tests/test_libraries_image.php
diff options
context:
space:
mode:
authorFlorian Pritz <bluewind@xinu.at>2016-08-20 12:59:31 +0200
committerFlorian Pritz <bluewind@xinu.at>2016-08-20 12:59:31 +0200
commitfd9ffa0ceea6eb8fea682440f575443f7fb52455 (patch)
tree8ce88d1a645b9576f38eb94457ab53ebf237219d /application/test/tests/test_libraries_image.php
parenta184be45fdd14e6e460f10768a5cc7282a357b8e (diff)
Test \libraries\Image some more
Signed-off-by: Florian Pritz <bluewind@xinu.at>
Diffstat (limited to 'application/test/tests/test_libraries_image.php')
-rw-r--r--application/test/tests/test_libraries_image.php15
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");
+ }
+ }
+
}