Ejemplo n.º 1
0
 /**
  * Tests the getSize() method.
  *
  * @param string $value
  * @param int    $expected
  *
  * @dataProvider getGetSizePixelValues
  */
 public function testGetSizePixelValues($value, $expected)
 {
     $imagine = new Imagine();
     $image = $imagine->create(new Box(100, 100));
     $document = $image->getDomDocument();
     $document->documentElement->setAttribute('width', $value);
     $document->documentElement->setAttribute('height', $value);
     $this->assertEquals($expected, $image->getSize()->getWidth());
     $this->assertEquals($expected, $image->getSize()->getHeight());
 }
Ejemplo n.º 2
0
 /**
  * Tests the font() method.
  */
 public function testFont()
 {
     $color = $this->getMock('Imagine\\Image\\Palette\\Color\\ColorInterface');
     $this->setExpectedException('Imagine\\Exception\\RuntimeException');
     $this->imagine->font($this->rootDir, 10, $color);
 }