public function testIsValidWithValidTransitDepartureTimeAndArrivalTime()
 {
     $this->directionsRequest->setDestination('foo');
     $this->directionsRequest->setOrigin('bar');
     $this->directionsRequest->setTravelMode(TravelMode::TRANSIT);
     $this->directionsRequest->setArrivalTime(new DateTime());
     $this->directionsRequest->setDepartureTime(new DateTime());
     $this->assertTrue($this->directionsRequest->isValid());
 }
 public function testRouteWithDirectionsRequestAndTransitModeAndDepartureTimeAndArrivalTime()
 {
     $request = new DirectionsRequest();
     $request->setOrigin('601-625 Ashbury Street, San Francisco');
     $request->setDestination('Bike Route 95, San Francisco');
     $request->setTravelMode(TravelMode::TRANSIT);
     $request->setArrivalTime(new DateTime());
     $request->setArrivalTime(new DateTime('+2 hours'));
     $response = $this->directions->route($request);
     $this->assertSame(DirectionsStatus::OK, $response->getStatus());
     $this->assertNotEmpty($response->getRoutes());
 }