Пример #1
0
 /**
  * @covers Image\Draw\Qrcode::generate
  */
 public function testGenerate()
 {
     $image = new Canvas(200, 200, '#000000');
     $image->attach($this->object);
     $this->object->setText('test');
     $this->assertTrue($this->object->generate());
 }
Пример #2
0
 /**
  * @covers Image\Draw\Watermark::generate
  */
 public function testGenerate()
 {
     $image = new Canvas(200, 200, '#000000');
     $image->attach($this->object);
     $this->object->setWatermark(dirname(__FILE__) . '/../../image.png');
     $this->assertTrue($this->object->generate());
 }
Пример #3
0
 /**
  * @covers Image\Fx\Vignette::generate
  */
 public function testGenerate()
 {
     $image = new Canvas(200, 200, '#ff0000');
     $image->attach($this->object);
     $this->object->setVignette(new Canvas(200, 200));
     $this->assertTrue($this->object->generate());
 }
Пример #4
0
 /**
  * @covers Image\Helper\Analyser::imageBrightness
  */
 public function testImageBrightness()
 {
     $image = new Canvas();
     $analyser = $image->attach($this->object);
     $image->openImage(dirname(__FILE__) . '/../../green.png');
     $this->assertEquals($this->object->imageBrightness(), 100);
     $image->destroyImage();
 }
Пример #5
0
 /**
  * @covers Image\Helper\Facedetector::generate
  */
 public function testGenerate()
 {
     $image = new Canvas(dirname(__FILE__) . '/../../portrait.jpg');
     $image->attach($this->object);
     $this->assertTrue($this->object->generate());
 }