function SmartcropTestCase::testImageEqual in Smart Crop 7
Same name and namespace in other branches
- 6 tests/smartcrop.test \SmartcropTestCase::testImageEqual()
Test the ImageEqual assertions.
File
- tests/
smartcrop.test, line 49 - Tests for the smartcrop module.
Class
- SmartcropTestCase
- @file Tests for the smartcrop module.
Code
function testImageEqual() {
$image1 = $expected_image = imagecreatefrompng(dirname(__FILE__) . '/left.png');
$image2 = $expected_image = imagecreatefrompng(dirname(__FILE__) . '/right.png');
$this
->assertImageNotEqual($image1, $image2);
$image2 = $expected_image = imagecreatefrompng(dirname(__FILE__) . '/left.png');
$this
->assertImageEqual($image1, $image2);
// Clean up.
imagedestroy($image1);
imagedestroy($image2);
}