예제 #1
0
 /**
  * @depends testUpdateMeeting
  */
 public function testDeleteMeeting(Meeting $meeting)
 {
     $meetingId = $meeting->getMeetingId();
     $this->meetingService->deleteMeeting($meetingId);
     $this->setExpectedException('\\GuzzleHttp\\Exception\\ClientException');
     $this->meetingService->getMeeting($meetingId);
 }
예제 #2
0
 /**
  * @dataProvider singleMeetingProvider
  */
 public function testGetMeeting($responseArray, $expectedMeeting)
 {
     $client = $this->getMockBuilder('Client')->setMethods(array('sendRequest'))->getMock();
     $client->method('sendRequest')->will($this->returnValue(array($responseArray)));
     $meetingService = new MeetingService($client);
     $actualMeeting = $meetingService->getMeeting($responseArray['meetingId']);
     $this->assertNotNull($actualMeeting);
     $this->assertInstanceOf('\\kenobi883\\GoToMeeting\\Models\\Meeting', $actualMeeting);
     $this->assertEquals($actualMeeting, $expectedMeeting);
 }