/** * Wrapper constructor. * * Initializes all the clients * @param $host * @param Config $config * @param string $username * @param string $password */ public function __construct($host, Config $config, $username = '', $password = '', array $options = array()) { $host = rtrim($host, '/'); $this->checkHost($host); $orig = $options; foreach ($config->getClients() as $client) { $options = $config->getOptions('clients', $client); $options['wsse_user'] = $username; $options['wsse_password'] = $password; $options['additionnal'] = $orig; $this->clients[$client] = new Client($host, $options); } }
public function testGetClients() { $clients = $this->config->getClients(); $this->assertEquals('static_resource', $clients[0]); }