예제 #1
0
 /**
  * Test the JImage::loadFile to makes sure PNG images are loaded properly.  In this case we
  * are taking the simple approach of loading an image file and asserting that the dimensions
  * are correct.
  *
  * @return  void
  *
  * @since   11.4
  */
 public function testloadFilePng()
 {
     // Get a new JImage inspector.
     $image = new JImageInspector();
     $image->loadFile($this->testFilePng);
     // Verify that the cropped image is the correct size.
     $this->assertEquals(341, imagesy($image->getClassProperty('handle')));
     $this->assertEquals(500, imagesx($image->getClassProperty('handle')));
     $this->assertEquals($this->testFilePng, $image->getPath());
 }