示例#1
0
 public function it_should_throw_on_is_logged_in_if_got_unexpected_response(HttpClient $client)
 {
     $client->get('Users/GetLoginState', ['userId' => $this->getPrimaryKeyValue()])->shouldBeCalled()->willReturn(Helper::falseResponse());
     $this->shouldThrow('\\Pisa\\GizmoAPI\\Exceptions\\UnexpectedResponseException')->duringIsLoggedIn();
 }
示例#2
0
 public function it_should_check_if_loginname_exists(HttpClient $client)
 {
     $loginName = '*****@*****.**';
     $client->get('Users/LoginNameExist', ['loginName' => $loginName])->shouldBeCalled()->willReturn(Helper::trueResponse());
     $this->hasLoginName($loginName)->shouldReturn(true);
     $client->get('Users/LoginNameExist', ['loginName' => $loginName])->shouldBeCalled()->willReturn(Helper::falseResponse());
     $this->hasLoginName($loginName)->shouldReturn(false);
 }