Location\PolygonTest::testIfAddPointsWorksAsExpected PHP Method

testIfAddPointsWorksAsExpected() public method

    public function testIfAddPointsWorksAsExpected()
    {
        $polygon = new Polygon();
        $this->assertEquals([], $polygon->getPoints());
        $point1 = new Coordinate(10, 10);
        $polygon->addPoint($point1);
        $this->assertEquals([$point1], $polygon->getPoints());
        $point2 = new Coordinate(10, 20);
        $polygon->addPoint($point2);
        $this->assertEquals([$point1, $point2], $polygon->getPoints());
    }