public function __construct(Client $eloqua, array $parameters, HookDispatcher $dispatcher) { $eloqua->authenticate($parameters['site'], $parameters['login'], $parameters['password'], $parameters['baseUrl']); $this->client = $eloqua; $this->parameters = $parameters; $this->dispatcher = $dispatcher; }
/** * @test * @expectedException InvalidArgumentException */ public function shouldThrowExceptionWhenAuthenticatingWithEmptyCreds() { $httpClient = $this->getHttpClientMock(array('addListener')); $client = new Client($httpClient); $client->authenticate('', '', ''); }