/** * Test the JImage::getFilterInstance method to make sure it behaves correctly * * @return void * * @since 11.3 */ public function testGetFilterInstance() { // Create a new JImageInspector object. $image = new JImageInspector(imagecreatetruecolor(1, 1)); // Get the filter instance. $filter = $image->getFilterInstance('inspector'); $this->assertInstanceOf('JImageFilterInspector', $filter); }
/** * Tests the JImage::sanitizeOffset method. * * @param mixed $input The input offset. * @param integer $expected The expected result offest. * * @return void * * @dataProvider getSanitizeOffsetData * @since 11.3 */ public function testSanitizeOffset($input, $expected) { // Create a new JImageInspector. $image = new JImageInspector(); // Validate the correct response. $this->assertEquals($expected, $image->sanitizeOffset($input)); }