From 912bdb7332cf4c48ae8e912eff1ab0fba8cce588 Mon Sep 17 00:00:00 2001 From: Ingo Schommer Date: Tue, 16 Apr 2019 16:07:43 +1200 Subject: [PATCH] Test generated file location --- tests/php/ImageTest.php | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/tests/php/ImageTest.php b/tests/php/ImageTest.php index 534a003f..fa94757f 100644 --- a/tests/php/ImageTest.php +++ b/tests/php/ImageTest.php @@ -349,6 +349,14 @@ public function testCacheFilename() $this->assertContains($neededPart, $imageFilename, 'Filename for cached image is correctly generated'); } + public function testGenerateImageInSameFolderAsOriginal() + { + // All fixtures are in a subfolder + $original = $this->objFromFixture(Image::class, 'imageWithoutTitle'); + $generated = $original->Pad(200, 200, 'CCCCCC', 0); + $this->assertEquals($original->Parent()->getFilename(), $generated->Parent()->getFilename()); + } + /** * Ensure dimensions are cached */