Location\PolygonTest::testIfContainsPointCheckWithLatitudeSignSwitchWorksAsExpected PHP Method

testIfContainsPointCheckWithLatitudeSignSwitchWorksAsExpected() public method

    public function testIfContainsPointCheckWithLatitudeSignSwitchWorksAsExpected()
    {
        $polygon = new Polygon();
        $polygon->addPoint(new Coordinate(-30, 20));
        $polygon->addPoint(new Coordinate(-30, 40));
        $polygon->addPoint(new Coordinate(30, 40));
        $polygon->addPoint(new Coordinate(30, 20));
        $point = new Coordinate(0, 30);
        $this->assertTrue($polygon->contains($point));
        $point = new Coordinate(-10, 30);
        $this->assertTrue($polygon->contains($point));
        $point = new Coordinate(10, 30);
        $this->assertTrue($polygon->contains($point));
    }