mirror of
https://github.com/Intervention/image.git
synced 2025-08-29 16:50:07 +02:00
switched default color from transparent-black to transparent-white (still 100% transparent)
This commit is contained in:
@@ -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:
|
||||
|
@@ -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();
|
||||
|
@@ -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();
|
||||
|
Reference in New Issue
Block a user