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); }
public static function withUsernameAndPassword($server, $username, $password, $options = []) { return new static(ExchangeWebServices::fromUsernameAndPassword($server, $username, $password, array_replace_recursive(self::$defaultClientOptions, $options))); }