Ejemplo n.º 1
0
 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'));
 }
Ejemplo n.º 2
0
 /**
  * @param string $username
  * @param string $password
  * @return bool
  */
 public function isAuthenticationValid($username, $password)
 {
     return $this->authResource->isAuthenticationValid($username, $password);
 }