/** * @expectedException \Ivory\GoogleMap\Exception\DirectionsException * @expectedExceptionMessage The directions waypoint stopover flag must be a boolean value. */ public function testStopoverWithInvalidValue() { $this->directionsWaypoint->setStopover('foo'); }
public function testRouteWithDirectionsRequestAndStopoverWaypoint() { $waypoint = new DirectionsWaypoint(); $waypoint->setLocation('Compiègne'); $waypoint->setStopover(true); $request = new DirectionsRequest(); $request->setOrigin('Lille'); $request->addWaypoint($waypoint); $request->setDestination('Paris'); $response = $this->directions->route($request); $this->assertSame(DirectionsStatus::OK, $response->getStatus()); $this->assertNotEmpty($response->getRoutes()); }