mirror of
https://github.com/Intervention/image.git
synced 2025-09-09 05:30:40 +02:00
fixed issue when converting transparent images to non-transparent formats
This commit is contained in:
@@ -140,6 +140,9 @@ class EncoderTest extends PHPUnit_Framework_TestCase
|
||||
$imagick->shouldReceive('setimagecompression')->once();
|
||||
$imagick->shouldReceive('setcompressionquality');
|
||||
$imagick->shouldReceive('setimagecompressionquality');
|
||||
$imagick->shouldReceive('setimagebackgroundcolor');
|
||||
$imagick->shouldReceive('setbackgroundcolor');
|
||||
$imagick->shouldReceive('flattenimages')->andReturn($imagick);
|
||||
$imagick->shouldReceive('__toString')->once()->andReturn(sprintf('mock-%s', $type));
|
||||
return $imagick;
|
||||
}
|
||||
|
@@ -1113,9 +1113,9 @@ class GdSystemTest extends PHPUnit_Framework_TestCase
|
||||
$this->assertEquals(1, $c[3]);
|
||||
|
||||
$c = $img->pickColor(0, 15);
|
||||
$this->assertEquals(0, $c[0]);
|
||||
$this->assertEquals(0, $c[1]);
|
||||
$this->assertEquals(0, $c[2]);
|
||||
$this->assertEquals(255, $c[0]);
|
||||
$this->assertEquals(255, $c[1]);
|
||||
$this->assertEquals(255, $c[2]);
|
||||
$this->assertEquals(0, $c[3]);
|
||||
}
|
||||
|
||||
@@ -1137,9 +1137,9 @@ class GdSystemTest extends PHPUnit_Framework_TestCase
|
||||
$this->assertEquals(1, $c[3]);
|
||||
|
||||
$c = $img->pickColor(0, 15);
|
||||
$this->assertEquals(0, $c[0]);
|
||||
$this->assertEquals(0, $c[1]);
|
||||
$this->assertEquals(0, $c[2]);
|
||||
$this->assertEquals(255, $c[0]);
|
||||
$this->assertEquals(255, $c[1]);
|
||||
$this->assertEquals(255, $c[2]);
|
||||
$this->assertEquals(0, $c[3]);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user