1
0
mirror of https://github.com/Intervention/image.git synced 2025-08-22 13:32:56 +02:00

Add ability to call Config::setOptions() with single array

This commit is contained in:
Oliver Vogel
2024-05-15 17:24:24 +02:00
parent 62a869ca48
commit a12b646f82
2 changed files with 46 additions and 1 deletions

View File

@@ -63,4 +63,21 @@ final class ConfigTest extends BaseTestCase
$this->assertFalse($result->decodeAnimation);
$this->assertEquals('000', $result->blendingColor);
}
public function testSetOptionsWithArray(): void
{
$config = new Config();
$result = $config->setOptions([
'autoOrientation' => false,
'decodeAnimation' => false,
'blendingColor' => 'f00',
]);
$this->assertFalse($config->autoOrientation);
$this->assertFalse($config->decodeAnimation);
$this->assertEquals('f00', $config->blendingColor);
$this->assertFalse($result->autoOrientation);
$this->assertFalse($result->decodeAnimation);
$this->assertEquals('f00', $result->blendingColor);
}
}