/** * @covers Imagine\Image\Point::getX * @covers Imagine\Image\Point::getY * @covers Imagine\Image\Point::move * * @dataProvider getMoves * * @param Imagine\Image\BoxInterface $box * @param integer $move * @param integer $x1 * @param integer $y1 */ public function testShouldMoveByGivenAmount(BoxInterface $box, $move, $x1, $y1) { $point = new Center($box); $shift = $point->move($move); $this->assertEquals($x1, $shift->getX()); $this->assertEquals($y1, $shift->getY()); }
/** * @covers Imagine\Image\Point\Center::getX * @covers Imagine\Image\Point\Center::getY * * @dataProvider getSizesAndCoordinates * * @param Imagine\Image\BoxInterface $box * @param Imagine\Image\PointInterface $expected */ public function testShouldGetCenterCoordinates(BoxInterface $box, PointInterface $expected) { $point = new Center($box); $this->assertEquals($expected->getX(), $point->getX()); $this->assertEquals($expected->getY(), $point->getY()); }