function SmartcropTestCase::testImageEqual in Smart Crop 6
Same name and namespace in other branches
- 7 tests/smartcrop.test \SmartcropTestCase::testImageEqual()
Test the ImageEqual assertions.
File
- tests/
smartcrop.test, line 52 - 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);
}