mirror of
https://github.com/Intervention/image.git
synced 2025-08-30 17:19:50 +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;
|
break;
|
||||||
|
|
||||||
case is_null($value):
|
case is_null($value):
|
||||||
$this->initFromArray(array(0, 0, 0, 0));
|
$this->initFromArray(array(255, 255, 255, 0));
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
@@ -9,14 +9,14 @@ class GdColorTest extends PHPUnit_Framework_TestCase
|
|||||||
public function testConstructor()
|
public function testConstructor()
|
||||||
{
|
{
|
||||||
$c = new Color;
|
$c = new Color;
|
||||||
$this->validateColor($c, 0, 0, 0, 127);
|
$this->validateColor($c, 255, 255, 255, 127);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function testParseNull()
|
public function testParseNull()
|
||||||
{
|
{
|
||||||
$c = new Color;
|
$c = new Color;
|
||||||
$c->parse(null);
|
$c->parse(null);
|
||||||
$this->validateColor($c, 0, 0, 0, 127);
|
$this->validateColor($c, 255, 255, 255, 127);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function testParseInteger()
|
public function testParseInteger()
|
||||||
@@ -152,7 +152,7 @@ class GdColorTest extends PHPUnit_Framework_TestCase
|
|||||||
$c = new Color;
|
$c = new Color;
|
||||||
$i = $c->getInt();
|
$i = $c->getInt();
|
||||||
$this->assertInternalType('int', $i);
|
$this->assertInternalType('int', $i);
|
||||||
$this->assertEquals($i, 2130706432);
|
$this->assertEquals(2147483647, $i);
|
||||||
|
|
||||||
$c = new Color(array(255, 255, 255));
|
$c = new Color(array(255, 255, 255));
|
||||||
$i = $c->getInt();
|
$i = $c->getInt();
|
||||||
@@ -185,7 +185,7 @@ class GdColorTest extends PHPUnit_Framework_TestCase
|
|||||||
$c = new Color;
|
$c = new Color;
|
||||||
$i = $c->getHex();
|
$i = $c->getHex();
|
||||||
$this->assertInternalType('string', $i);
|
$this->assertInternalType('string', $i);
|
||||||
$this->assertEquals($i, '000000');
|
$this->assertEquals($i, 'ffffff');
|
||||||
|
|
||||||
$c = new Color(array(255, 255, 255, 1));
|
$c = new Color(array(255, 255, 255, 1));
|
||||||
$i = $c->getHex();
|
$i = $c->getHex();
|
||||||
@@ -208,7 +208,7 @@ class GdColorTest extends PHPUnit_Framework_TestCase
|
|||||||
$c = new Color;
|
$c = new Color;
|
||||||
$i = $c->getArray();
|
$i = $c->getArray();
|
||||||
$this->assertInternalType('array', $i);
|
$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));
|
$c = new Color(array(255, 255, 255, 1));
|
||||||
$i = $c->getArray();
|
$i = $c->getArray();
|
||||||
@@ -231,7 +231,7 @@ class GdColorTest extends PHPUnit_Framework_TestCase
|
|||||||
$c = new Color;
|
$c = new Color;
|
||||||
$i = $c->getRgba();
|
$i = $c->getRgba();
|
||||||
$this->assertInternalType('string', $i);
|
$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));
|
$c = new Color(array(255, 255, 255, 1));
|
||||||
$i = $c->getRgba();
|
$i = $c->getRgba();
|
||||||
|
@@ -40,14 +40,14 @@ class ImagickColorTest extends PHPUnit_Framework_TestCase
|
|||||||
public function testConstructor()
|
public function testConstructor()
|
||||||
{
|
{
|
||||||
$c = new Color;
|
$c = new Color;
|
||||||
$this->validateColor($c, 0, 0, 0, 0);
|
$this->validateColor($c, 255, 255, 255, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function testParseNull()
|
public function testParseNull()
|
||||||
{
|
{
|
||||||
$c = new Color;
|
$c = new Color;
|
||||||
$c->parse(null);
|
$c->parse(null);
|
||||||
$this->validateColor($c, 0, 0, 0, 0);
|
$this->validateColor($c, 255, 255, 255, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function testParseInteger()
|
public function testParseInteger()
|
||||||
@@ -187,7 +187,7 @@ class ImagickColorTest extends PHPUnit_Framework_TestCase
|
|||||||
$c = new Color;
|
$c = new Color;
|
||||||
$i = $c->getInt();
|
$i = $c->getInt();
|
||||||
$this->assertInternalType('int', $i);
|
$this->assertInternalType('int', $i);
|
||||||
$this->assertEquals($i, 0);
|
$this->assertEquals($i, 16777215);
|
||||||
|
|
||||||
$c = new Color(array(255, 255, 255));
|
$c = new Color(array(255, 255, 255));
|
||||||
$i = $c->getInt();
|
$i = $c->getInt();
|
||||||
@@ -225,7 +225,7 @@ class ImagickColorTest extends PHPUnit_Framework_TestCase
|
|||||||
$c = new Color;
|
$c = new Color;
|
||||||
$i = $c->getHex();
|
$i = $c->getHex();
|
||||||
$this->assertInternalType('string', $i);
|
$this->assertInternalType('string', $i);
|
||||||
$this->assertEquals($i, '000000');
|
$this->assertEquals($i, 'ffffff');
|
||||||
|
|
||||||
$c = new Color(array(255, 255, 255, 1));
|
$c = new Color(array(255, 255, 255, 1));
|
||||||
$i = $c->getHex();
|
$i = $c->getHex();
|
||||||
@@ -248,7 +248,7 @@ class ImagickColorTest extends PHPUnit_Framework_TestCase
|
|||||||
$c = new Color;
|
$c = new Color;
|
||||||
$i = $c->getArray();
|
$i = $c->getArray();
|
||||||
$this->assertInternalType('array', $i);
|
$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));
|
$c = new Color(array(255, 255, 255, 1));
|
||||||
$i = $c->getArray();
|
$i = $c->getArray();
|
||||||
@@ -271,7 +271,7 @@ class ImagickColorTest extends PHPUnit_Framework_TestCase
|
|||||||
$c = new Color;
|
$c = new Color;
|
||||||
$i = $c->getRgba();
|
$i = $c->getRgba();
|
||||||
$this->assertInternalType('string', $i);
|
$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));
|
$c = new Color(array(255, 255, 255, 1));
|
||||||
$i = $c->getRgba();
|
$i = $c->getRgba();
|
||||||
|
Reference in New Issue
Block a user