コード例 #1
0
ファイル: APITest.php プロジェクト: jchoi926/php-ews
 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);
 }
コード例 #2
0
ファイル: API.php プロジェクト: jchoi926/php-ews
 public static function withUsernameAndPassword($server, $username, $password, $options = [])
 {
     return new static(ExchangeWebServices::fromUsernameAndPassword($server, $username, $password, array_replace_recursive(self::$defaultClientOptions, $options)));
 }