/** * @dataProvider groupKey */ public function testGetScheduledMeetings($groupKey) { $meetings = $this->groupService->getMeetingsByGroup($groupKey); $this->assertNotEmpty($meetings); $actualMeeting = $meetings[0]; $this->assertNotNull($actualMeeting); $this->assertInstanceOf('\\kenobi883\\GoToMeeting\\Models\\Meeting', $actualMeeting); $this->assertAttributeNotEmpty('groupName', $actualMeeting); }
/** * @dataProvider singleMeetingProvider */ public function testGetScheduledMeetings($responseArray, $expectedMeeting) { $groupKey = 12345; $client = $this->getMockBuilder('Client')->setMethods(array('sendRequest'))->getMock(); $client->method('sendRequest')->will($this->returnValue(array($responseArray))); $client->expects($this->once())->method('sendRequest')->with($this->stringContains('GET', false), $this->stringContains("groups/{$groupKey}/meetings"), $this->attributeEqualTo('data', array('scheduled' => 'true'))); $groupService = new GroupService($client); $meetings = $groupService->getMeetingsByGroup($groupKey); $this->assertNotEmpty($meetings); $actualMeeting = $meetings[0]; $this->assertNotNull($actualMeeting); $this->assertInstanceOf('\\kenobi883\\GoToMeeting\\Models\\Meeting', $actualMeeting); $this->assertEquals($expectedMeeting, $actualMeeting); $this->assertAttributeNotEmpty('groupName', $actualMeeting); }