Example #1
0
 public function testGetEventAvailability()
 {
     // Create the Event. (Response 0)
     $event = new Event($this->ews, 'N15RLM');
     // Get availability. (Response 1)
     $event->getAvailability();
     // Get the request from the history
     $request = $this->history[1]['request'];
     // Assert that the request is made to the correct endpoint
     $this->assertRequestMethodSame('GET', $request);
     $this->assertRequestUriPathSame('api/v2/events/N15RLM/availability.json', $request);
     // Assert that the request uses the OAuth access token to authenticate
     $this->assertRequestAuthenticates(self::ACCESS_TOKEN, $request);
 }