コード例 #1
0
 /**
  * Verify that the version parameter defaults to "latest" when specifying a config section
  * @group unit
  */
 public function testDefaultVersionConfigSection()
 {
     $endpoint = 'http://test.endpoint';
     $username = '******';
     $password = '******';
     $config = new Config(array('section' => array('endpoint' => $endpoint, 'username' => $username, 'password' => $password)), 'section');
     $this->assertEquals($config->getEndpoint(), $endpoint);
     $this->assertEquals($config->getUsername(), $username);
     $this->assertEquals($config->getPassword(), $password);
 }
コード例 #2
0
 public function __construct(Config $config)
 {
     parent::__construct($config->getEndpoint(), $config->getGuzzleConfig());
     // Set up basic auth
     $this->setDefaultOption('auth', array($config->getUsername(), $config->getPassword()));
 }