Example #1
0
 /**
  * @test
  * @depends points_can_be_added_on_plane_can_be_counted
  */
 public function points_added_can_be_retrieved_from_plane()
 {
     $point = new Point(1, 1);
     $plane = new Plane(10, 10);
     $plane->addPoint($point);
     $this->assertSame($point, $plane->getPoint(1, 1), 'Point returned by plane should be the same one added.');
     $this->assertTrue($plane->hasPoint($point), 'Plane should have previously added point.');
     $this->assertTrue($plane->hasPoint(new Point(1, 1)), 'Plane should have point previously added, but searched through a different object.');
 }