Ejemplo n.º 1
0
 /**
  * @param string $username
  * @param string $password
  */
 public function __construct($username = null, $password = null, Api $api = null)
 {
     $this->api = $api ?: new Api();
     if ($username && $password) {
         $this->api->setCredentials(new Basic($username, $password));
     }
     parent::__construct();
 }
Ejemplo n.º 2
0
 public function let(Api $client)
 {
     $client->setCredentials(Argument::type('Bitbucket\\API\\Authentication\\AuthenticationInterface'))->shouldBeCalled();
     $this->beConstructedWith('foo', 'password', $client);
 }