Exemplo n.º 1
0
 /**
  * @testdox The random color is within borders and not 0, 0, 0
  *
  * @covers Mautic\CoreBundle\Helper\EncryptionHelper::buildRandomColor
  * @covers Mautic\CoreBundle\Helper\EncryptionHelper::getColorArray
  */
 public function testThatRandomColorIsWithinBorders()
 {
     $helper = new ColorHelper();
     $helper->buildRandomColor();
     $rgb = $helper->getColorArray();
     $this->assertGreaterThan(0, $rgb[0]);
     $this->assertGreaterThan(0, $rgb[1]);
     $this->assertGreaterThan(0, $rgb[2]);
     $this->assertLessThanOrEqual(256, $rgb[0]);
     $this->assertLessThanOrEqual(256, $rgb[1]);
     $this->assertLessThanOrEqual(256, $rgb[2]);
 }