public function testIsAuthenticationValidServerError() { $that = $this; $request = $this->createMockRequest(function ($request) use($that) { return $that->throwException(BadResponseException::factory($request, $that->createMockResponse())); }); $this->getMockHttpClient()->expects($this->once())->method('post')->will($this->returnValue($request)); $this->setExpectedException('Guzzle\\Http\\Exception\\BadResponseException'); $this->assertFalse($this->resource->isAuthenticationValid('foo', 'bar')); }
/** * @param string $username * @param string $password * @return bool */ public function isAuthenticationValid($username, $password) { return $this->authResource->isAuthenticationValid($username, $password); }