/** * @dataProvider getCropParams */ public function testValidatesCropParameters($x, $y, $width, $height, $mode, $exceptionMessage) { try { $this->url->crop($x, $y, $width, $height, $mode); $this->fail('Expected an exception'); } catch (InvalidArgumentException $e) { $this->assertSame($exceptionMessage, $e->getMessage()); } }