/** * @depends testUpdateMeeting */ public function testDeleteMeeting(Meeting $meeting) { $meetingId = $meeting->getMeetingId(); $this->meetingService->deleteMeeting($meetingId); $this->setExpectedException('\\GuzzleHttp\\Exception\\ClientException'); $this->meetingService->getMeeting($meetingId); }
/** * @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); }