Example #1
0
 public function testWithUsernameAndPassword()
 {
     //Create our expected item, get our class to build our item, then compare
     $expected = ExchangeWebServices::fromUsernameAndPassword('test.com', 'username', 'password', ['version' => ExchangeWebServices::VERSION_2010]);
     $client = API::withUsernameAndPassword('test.com', 'username', 'password');
     $actual = $client->getClient();
     $this->assertEquals($expected, $actual);
 }
Example #2
0
 public static function withUsernameAndPassword($server, $username, $password, $options = [])
 {
     return new static(ExchangeWebServices::fromUsernameAndPassword($server, $username, $password, array_replace_recursive(self::$defaultClientOptions, $options)));
 }