Open Journal Systems  3.3.0
MockClient.php
1 <?php
2 
4 
7 
11 class MockClient extends Client
12 {
26  public static function factory($config = array())
27  {
28  $config = Collection::fromConfig($config, array(
29  'base_url' => '{scheme}://127.0.0.1:8124/{api_version}/{subdomain}',
30  'scheme' => 'http',
31  'api_version' => 'v1'
32  ), array('username', 'password', 'subdomain'));
33 
34  return new self($config->get('base_url'), $config);
35  }
36 }
Guzzle\Tests\Service\Mock\MockClient\factory
static factory($config=array())
Definition: MockClient.php:26
Guzzle\Tests\Service\Mock\MockClient
Definition: MockClient.php:11
Guzzle\Service\Client
Definition: lib/vendor/guzzle/guzzle/src/Guzzle/Service/Client.php:25
Guzzle\Tests\Service\Mock
Guzzle\Common\Collection\fromConfig
static fromConfig(array $config=array(), array $defaults=array(), array $required=array())
Definition: paymethod/paypal/lib/vendor/guzzle/guzzle/src/Guzzle/Common/Collection.php:37
Guzzle\Common\Collection
Definition: paymethod/paypal/lib/vendor/guzzle/guzzle/src/Guzzle/Common/Collection.php:11