Esempio n. 1
0
 public function testSetGetApiBaseUrl()
 {
     $this->assertEquals("endpoint", $this->config->setApiBaseUrl("endpoint")->getApiBaseUrl());
 }
Esempio n. 2
0
 public function testWpFactoryEventDispatcherForGuzzleClientLogsWhenEventDispatch()
 {
     $config = new Config();
     $config->setLogger(Phake::mock('\\Psr\\Log\\LoggerInterface'));
     $config->setApiBaseUrl("Invalid URL to prevent making actual calls");
     $authService = Client::wpFactory($config)->auth();
     try {
         $authService->deOrbit("Request ID");
     } catch (\Exception $e) {
         // An exception should be thrown since the URL is invalid
     }
     Phake::verify($config->getLogger())->debug("Sending request", $this->anything());
 }