From 29ca49baa79a129625bb87928ae607a4af77f75e Mon Sep 17 00:00:00 2001 From: Oliver Vogel Date: Fri, 23 May 2014 17:19:02 +0200 Subject: [PATCH] switched default color from transparent-black to transparent-white (still 100% transparent) --- src/Intervention/Image/AbstractColor.php | 2 +- tests/GdColorTest.php | 12 ++++++------ tests/ImagickColorTest.php | 12 ++++++------ 3 files changed, 13 insertions(+), 13 deletions(-) diff --git a/src/Intervention/Image/AbstractColor.php b/src/Intervention/Image/AbstractColor.php index 8688be8c..a723dabc 100644 --- a/src/Intervention/Image/AbstractColor.php +++ b/src/Intervention/Image/AbstractColor.php @@ -132,7 +132,7 @@ abstract class AbstractColor break; case is_null($value): - $this->initFromArray(array(0, 0, 0, 0)); + $this->initFromArray(array(255, 255, 255, 0)); break; default: diff --git a/tests/GdColorTest.php b/tests/GdColorTest.php index 0145c163..51d96c85 100644 --- a/tests/GdColorTest.php +++ b/tests/GdColorTest.php @@ -9,14 +9,14 @@ class GdColorTest extends PHPUnit_Framework_TestCase public function testConstructor() { $c = new Color; - $this->validateColor($c, 0, 0, 0, 127); + $this->validateColor($c, 255, 255, 255, 127); } public function testParseNull() { $c = new Color; $c->parse(null); - $this->validateColor($c, 0, 0, 0, 127); + $this->validateColor($c, 255, 255, 255, 127); } public function testParseInteger() @@ -152,7 +152,7 @@ class GdColorTest extends PHPUnit_Framework_TestCase $c = new Color; $i = $c->getInt(); $this->assertInternalType('int', $i); - $this->assertEquals($i, 2130706432); + $this->assertEquals(2147483647, $i); $c = new Color(array(255, 255, 255)); $i = $c->getInt(); @@ -185,7 +185,7 @@ class GdColorTest extends PHPUnit_Framework_TestCase $c = new Color; $i = $c->getHex(); $this->assertInternalType('string', $i); - $this->assertEquals($i, '000000'); + $this->assertEquals($i, 'ffffff'); $c = new Color(array(255, 255, 255, 1)); $i = $c->getHex(); @@ -208,7 +208,7 @@ class GdColorTest extends PHPUnit_Framework_TestCase $c = new Color; $i = $c->getArray(); $this->assertInternalType('array', $i); - $this->assertEquals($i, array(0, 0, 0, 0)); + $this->assertEquals($i, array(255, 255, 255, 0)); $c = new Color(array(255, 255, 255, 1)); $i = $c->getArray(); @@ -231,7 +231,7 @@ class GdColorTest extends PHPUnit_Framework_TestCase $c = new Color; $i = $c->getRgba(); $this->assertInternalType('string', $i); - $this->assertEquals($i, 'rgba(0, 0, 0, 0.00)'); + $this->assertEquals($i, 'rgba(255, 255, 255, 0.00)'); $c = new Color(array(255, 255, 255, 1)); $i = $c->getRgba(); diff --git a/tests/ImagickColorTest.php b/tests/ImagickColorTest.php index 358d5afb..6a9df3e6 100644 --- a/tests/ImagickColorTest.php +++ b/tests/ImagickColorTest.php @@ -40,14 +40,14 @@ class ImagickColorTest extends PHPUnit_Framework_TestCase public function testConstructor() { $c = new Color; - $this->validateColor($c, 0, 0, 0, 0); + $this->validateColor($c, 255, 255, 255, 0); } public function testParseNull() { $c = new Color; $c->parse(null); - $this->validateColor($c, 0, 0, 0, 0); + $this->validateColor($c, 255, 255, 255, 0); } public function testParseInteger() @@ -187,7 +187,7 @@ class ImagickColorTest extends PHPUnit_Framework_TestCase $c = new Color; $i = $c->getInt(); $this->assertInternalType('int', $i); - $this->assertEquals($i, 0); + $this->assertEquals($i, 16777215); $c = new Color(array(255, 255, 255)); $i = $c->getInt(); @@ -225,7 +225,7 @@ class ImagickColorTest extends PHPUnit_Framework_TestCase $c = new Color; $i = $c->getHex(); $this->assertInternalType('string', $i); - $this->assertEquals($i, '000000'); + $this->assertEquals($i, 'ffffff'); $c = new Color(array(255, 255, 255, 1)); $i = $c->getHex(); @@ -248,7 +248,7 @@ class ImagickColorTest extends PHPUnit_Framework_TestCase $c = new Color; $i = $c->getArray(); $this->assertInternalType('array', $i); - $this->assertEquals($i, array(0, 0, 0, 0)); + $this->assertEquals($i, array(255, 255, 255, 0)); $c = new Color(array(255, 255, 255, 1)); $i = $c->getArray(); @@ -271,7 +271,7 @@ class ImagickColorTest extends PHPUnit_Framework_TestCase $c = new Color; $i = $c->getRgba(); $this->assertInternalType('string', $i); - $this->assertEquals($i, 'rgba(0, 0, 0, 0.00)'); + $this->assertEquals($i, 'rgba(255, 255, 255, 0.00)'); $c = new Color(array(255, 255, 255, 1)); $i = $c->getRgba();