/** * Test that GD::failedResample() returns true for the current image * manipulation only if it previously failed * @return void */ public function testFailedResample() { $fullPath = realpath(dirname(__FILE__) . '/gdtest/nonimagedata.jpg'); $fullPath2 = realpath(dirname(__FILE__) . '/gdtest/test_gif.gif'); // Load invalid file $gd = new GDBackend(); $gd->loadFrom($fullPath); // Cache should refre to this file $this->assertTrue($gd->failedResample($fullPath, filemtime($fullPath))); $this->assertFalse($gd->failedResample($fullPath2, filemtime($fullPath2))); }