Exemplo n.º 1
0
 public function testValidateCredentialsInvalid()
 {
     $invalid = array('sitename' => $this->authInfo['sitename'], 'username' => '*****@*****.**', 'password' => 'alksdfjfkjslkjfd');
     $account = Factory::SmxSimpleMeeting('WebEx', 'Account', $invalid);
     $result = $account->validateCredentials();
     $this->assertFalse($result);
 }
Exemplo n.º 2
0
 public function testValidateCredentialsInvalid()
 {
     $invalidSalt = array('baseUrl' => $this->authInfo['baseUrl'] . 'asdf', 'salt' => ';lakjdsfl;akjdgflkajdflkja');
     $account = Factory::SmxSimpleMeeting('BigBlueButton', 'Account', $invalidSalt);
     $result = $account->validateCredentials();
     $this->assertFalse($result);
 }
Exemplo n.º 3
0
 public function testEndMeeting()
 {
     $meetingKey = '562147';
     $hostPassword = '******';
     $meeting = Factory::SmxSimpleMeeting('BigBlueButton', 'Meeting', $this->authInfo, array('meetingKey' => $meetingKey, 'hostPassword' => $hostPassword));
     $meeting->endMeeting();
     $this->assertTrue(true);
 }
Exemplo n.º 4
0
 public function testCreateMeeting()
 {
     $meeting = Factory::SmxSimpleMeeting('JoinMe', 'Meeting', $this->authInfo);
     $meeting->createMeeting();
     $this->assertRegExp('/^[0-9]{9}$/', $meeting->meetingKey);
     $this->assertRegExp('/^[0-9]{9}$/', $meeting->meetingPassword);
     $this->assertStringStartsWith('http', $meeting->joinUrl);
     $this->assertStringStartsWith('http', $meeting->hostUrl);
 }
Exemplo n.º 5
0
 public function testGetAttendeeList()
 {
     $meeting = Factory::SmxSimpleMeeting('WebEx', 'Meeting', $this->authInfo);
     $meeting->createMeeting(array('meetingPassword' => 'Sumi123', 'meetingName' => __FUNCTION__));
     $attendeeInfo = array('name' => 'Phillip', 'email' => '*****@*****.**', 'meetingKey' => $meeting->meetingKey);
     $attendee = Factory::SmxSimpleMeeting('WebEx', 'Attendee', $this->authInfo, $attendeeInfo);
     $attendee->addAttendee();
     //$attendeeId = $meeting->addAttendee('Phillip','*****@*****.**');
     $attendeeList = $attendee->getAttendeeList();
 }
Exemplo n.º 6
0
 public function testValidateCredentialsInvalid()
 {
     $invalid = array('email' => '*****@*****.**', 'password' => ';lakjdsfl;akjdgflkajdflkja');
     try {
         $account = Factory::SmxSimpleMeeting('JoinMe', 'Account', $invalid);
         $result = true;
     } catch (\ErrorException $e) {
         $result = false;
     }
     $this->assertFalse($result);
 }
Exemplo n.º 7
0
 public function testDeleteMeeting()
 {
     $options = array('meetingName' => __FUNCTION__);
     $meeting = Factory::SmxSimpleMeeting('Citrix', 'Meeting', $this->authInfo, $options);
     $meeting->createMeeting();
     $this->assertNotEmpty($meeting->meetingKey);
     $meeting->deleteMeeting();
     try {
         $details = $meeting->getServerMeetingDetails();
     } catch (\ErrorException $e) {
         $this->assertEquals(404, $e->getCode());
     }
 }
Exemplo n.º 8
0
 /**
  * Test that the username/password/sitename provided are valid
  * 
  * @return boolean
  */
 public function validateCredentials()
 {
     if ($this->isAuthenticated()) {
         $user = \Smx\SimpleMeetings\Factory::SmxSimpleMeeting('WebEx', 'User', array('sitename' => $this->sitename, 'username' => $this->username, 'password' => $this->password));
         try {
             $details = $user->getServerUserDetails();
             return true;
         } catch (\ErrorException $e) {
             return false;
         }
     } else {
         return false;
     }
 }
Exemplo n.º 9
0
 /**
  * Test baseUrl and Salt to ensure they are valid
  * 
  * @return boolean True/false - success/fail
  */
 public function validateCredentials()
 {
     if ($this->isAuthenticated()) {
         $meeting = \Smx\SimpleMeetings\Factory::SmxSimpleMeeting('BigBlueButton', 'Meeting', array('baseUrl' => $this->baseUrl, 'salt' => $this->salt));
         try {
             $list = $meeting->getMeetingList();
             return true;
         } catch (\ErrorException $e) {
             return false;
         }
     } else {
         return false;
     }
 }
Exemplo n.º 10
0
 public function testGetServerUserDetailsByOrganizerKey()
 {
     $user = Factory::SmxSimpleMeeting('Citrix', 'User', $this->authInfo);
     $details = $user->getServerUserDetails($this->authInfo['organizerKey']);
     $this->assertTrue(is_object($details));
 }
Exemplo n.º 11
0
 public function testValidateCredentialsInvalid()
 {
     $invalid = array('apiKey' => $this->authInfo['apiKey'], 'accessToken' => ';lakjdsfl;akjdgflkajdflkja');
     $account = Factory::SmxSimpleMeeting('Citrix', 'Account', $invalid);
     $this->assertFalse($account->validateCredentials());
 }
Exemplo n.º 12
0
 /**
  * Test apiKey and accessToken to ensure they are valid
  * 
  * @return boolean True/false - success/fail
  */
 public function validateCredentials()
 {
     if ($this->isAuthenticated()) {
         $meeting = \Smx\SimpleMeetings\Factory::SmxSimpleMeeting('Citrix', 'Meeting', array('apiKey' => $this->apiKey, 'accessToken' => $this->accessToken));
         try {
             $list = $meeting->getMeetingList();
             return true;
         } catch (\ErrorException $e) {
             return false;
         }
     }
 }
Exemplo n.º 13
0
 public function testGetUserList()
 {
     $user = Factory::SmxSimpleMeeting('WebEx', 'User', $this->authInfo);
     $userList = $user->getUserList();
     $this->assertInstanceOf('\\Smx\\SimpleMeetings\\Shared\\ItemList', $userList);
 }
Exemplo n.º 14
0
 public function testGetAttendeeHistory()
 {
     /*
      * Test getting a list of all attendee usage for past month
      */
     $meeting = Factory::SmxSimpleMeeting('WebEx', 'Meeting', $this->authInfo);
     // Get meetings for past month
     $searchOptions = array('startTimeRangeStart' => date('m/d/Y 00:00:00', time() - 2592000), 'startTimeRangeEnd' => date('m/d/Y 00:00:00', time()));
     $list = $meeting->getAttendeeHistory(false, $searchOptions);
     $this->assertInstanceOf('\\Smx\\SimpleMeetings\\Shared\\ItemList', $list);
     /*
      * Use one of the results to test pulling history for a single meeting
      */
     $sample = $list->current();
     $newMeeting = Factory::SmxSimpleMeeting('WebEx', 'Meeting', $this->authInfo);
     $newMeeting->setOptions(array('meetingKey' => $sample->meetingKey));
     $newMeeting->getAttendeeHistory();
     $this->assertGreaterThanOrEqual(7, count($newMeeting->attendeeHistoryDetails));
 }