Example #1
0
 public function testWithCallbackToken()
 {
     //Create our expected item, get our class to build our item, then compare
     $expected = ExchangeWebServices::fromCallbackToken('test.com', 'token', ['version' => ExchangeWebServices::VERSION_2010]);
     $client = API::withCallbackToken('test.com', 'token');
     $actual = $client->getClient();
     $ntlmSoapReflection = new \ReflectionClass(API\NTLMSoapClient::class);
     $reflectedProp = $ntlmSoapReflection->getProperty('auth');
     $reflectedProp->setAccessible(true);
     $this->assertEquals($reflectedProp->getValue($expected->getClient()), $reflectedProp->getValue($actual->getClient()));
 }
Example #2
0
 public static function withCallbackToken($server, $token, $options = [])
 {
     return new static(ExchangeWebServices::fromCallbackToken($server, $token, array_replace_recursive(self::$defaultClientOptions, $options)));
 }