Exemplo n.º 1
0
 public function testGetRedChannelMethodReturnsValueForRedChannel()
 {
     $color = new Color(255, 204, 0, 0.5);
     $this->assertEquals(255, $color->getRed(ColorInterface::OUTPUT_INT));
     $this->assertEquals('ff', $color->getRed(ColorInterface::OUTPUT_HEX));
     $this->assertEquals(1.0, $color->getRed(ColorInterface::OUTPUT_FLOAT));
     $this->assertEquals('100.0%', $color->getRed(ColorInterface::OUTPUT_PERCENT, 1));
     $this->setExpectedException('Phower\\Image\\Exception\\InvalidArgumentException');
     $color->getRed(null);
 }