Example #1
0
 public function testHTML()
 {
     $this->assertFalse(Drawing::htmlToRGB('0'));
     $this->assertFalse(Drawing::htmlToRGB('00'));
     $this->assertFalse(Drawing::htmlToRGB('0000'));
     $this->assertFalse(Drawing::htmlToRGB('00000'));
     $this->assertInternalType('array', Drawing::htmlToRGB('ABCDEF'));
     $this->assertCount(3, Drawing::htmlToRGB('ABCDEF'));
     $this->assertEquals(array(0xab, 0xcd, 0xef), Drawing::htmlToRGB('ABCDEF'));
     $this->assertEquals(array(0xab, 0xcd, 0xef), Drawing::htmlToRGB('#ABCDEF'));
     $this->assertEquals(array(0xaa, 0xbb, 0xcc), Drawing::htmlToRGB('ABC'));
     $this->assertEquals(array(0xaa, 0xbb, 0xcc), Drawing::htmlToRGB('#ABC'));
 }