mirror of
https://github.com/Intervention/image.git
synced 2025-08-23 22:12:51 +02:00
Rename Image::blendTransparency() to Image::background()
This commit is contained in:
@@ -18,12 +18,12 @@ final class ConfigTest extends BaseTestCase
|
||||
|
||||
$this->assertTrue($config->autoOrientation);
|
||||
$this->assertTrue($config->decodeAnimation);
|
||||
$this->assertEquals('ffffff', $config->blendingColor);
|
||||
$this->assertEquals('ffffff', $config->backgroundColor);
|
||||
|
||||
$config = new Config(
|
||||
autoOrientation: false,
|
||||
decodeAnimation: false,
|
||||
blendingColor: 'f00',
|
||||
backgroundColor: 'f00',
|
||||
strip: true,
|
||||
);
|
||||
$this->assertInstanceOf(Config::class, $config);
|
||||
@@ -31,7 +31,7 @@ final class ConfigTest extends BaseTestCase
|
||||
$this->assertFalse($config->autoOrientation);
|
||||
$this->assertFalse($config->decodeAnimation);
|
||||
$this->assertTrue($config->strip);
|
||||
$this->assertEquals('f00', $config->blendingColor);
|
||||
$this->assertEquals('f00', $config->backgroundColor);
|
||||
}
|
||||
|
||||
public function testGetSetOptions(): void
|
||||
@@ -40,35 +40,35 @@ final class ConfigTest extends BaseTestCase
|
||||
$this->assertTrue($config->autoOrientation);
|
||||
$this->assertTrue($config->decodeAnimation);
|
||||
$this->assertFalse($config->strip);
|
||||
$this->assertEquals('ffffff', $config->blendingColor);
|
||||
$this->assertEquals('ffffff', $config->backgroundColor);
|
||||
|
||||
$result = $config->setOptions(
|
||||
autoOrientation: false,
|
||||
decodeAnimation: false,
|
||||
blendingColor: 'f00',
|
||||
backgroundColor: 'f00',
|
||||
strip: true,
|
||||
);
|
||||
|
||||
$this->assertFalse($config->autoOrientation);
|
||||
$this->assertFalse($config->decodeAnimation);
|
||||
$this->assertEquals('f00', $config->blendingColor);
|
||||
$this->assertEquals('f00', $config->backgroundColor);
|
||||
|
||||
$this->assertFalse($result->autoOrientation);
|
||||
$this->assertFalse($result->decodeAnimation);
|
||||
$this->assertTrue($result->strip);
|
||||
$this->assertEquals('f00', $result->blendingColor);
|
||||
$this->assertEquals('f00', $result->backgroundColor);
|
||||
|
||||
$result = $config->setOptions(blendingColor: '000');
|
||||
$result = $config->setOptions(backgroundColor: '000');
|
||||
|
||||
$this->assertFalse($config->autoOrientation);
|
||||
$this->assertFalse($config->decodeAnimation);
|
||||
$this->assertTrue($config->strip);
|
||||
$this->assertEquals('000', $config->blendingColor);
|
||||
$this->assertEquals('000', $config->backgroundColor);
|
||||
|
||||
$this->assertFalse($result->autoOrientation);
|
||||
$this->assertFalse($result->decodeAnimation);
|
||||
$this->assertTrue($result->strip);
|
||||
$this->assertEquals('000', $result->blendingColor);
|
||||
$this->assertEquals('000', $result->backgroundColor);
|
||||
}
|
||||
|
||||
public function testSetOptionsWithArray(): void
|
||||
@@ -77,17 +77,17 @@ final class ConfigTest extends BaseTestCase
|
||||
$result = $config->setOptions([
|
||||
'autoOrientation' => false,
|
||||
'decodeAnimation' => false,
|
||||
'blendingColor' => 'f00',
|
||||
'backgroundColor' => 'f00',
|
||||
'strip' => true,
|
||||
]);
|
||||
|
||||
$this->assertFalse($config->autoOrientation);
|
||||
$this->assertFalse($config->decodeAnimation);
|
||||
$this->assertTrue($config->strip);
|
||||
$this->assertEquals('f00', $config->blendingColor);
|
||||
$this->assertEquals('f00', $config->backgroundColor);
|
||||
$this->assertFalse($result->autoOrientation);
|
||||
$this->assertFalse($result->decodeAnimation);
|
||||
$this->assertTrue($result->strip);
|
||||
$this->assertEquals('f00', $result->blendingColor);
|
||||
$this->assertEquals('f00', $result->backgroundColor);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user