public function testCalcImageSize() { $imageCreator = new GdThumb(); $imageCreator->setSource($this->path . 'hlegius.jpg'); $method = new \ReflectionMethod('Deepzoom\\ImageAdapter\\GdThumb', 'calcImageSize'); $method->setAccessible(TRUE); $result = $method->invoke($imageCreator, 0, 100); $this->assertInternalType('array', $result, 'calcImageSize() These calculations are based on both the provided dimensions and $this->maxWidth and $this->maxHeight'); $this->assertEquals(array('newWidth' => 1, 'newHeight' => 100), $result, 'calcImageSize() These calculations are based on both the provided dimensions and $this->maxWidth and $this->maxHeight'); $result = $method->invoke($imageCreator, 0, 0); $this->assertInternalType('array', $result, 'calcImageSize() These calculations are based on both the provided dimensions and $this->maxWidth and $this->maxHeight'); $this->assertEquals(array('newWidth' => 1, 'newHeight' => 1), $result, 'calcImageSize() These calculations are based on both the provided dimensions and $this->maxWidth and $this->maxHeight'); }