Exemple #1
0
 public function it_should_notify_ui(HttpClient $client)
 {
     $message = 'Test';
     $parameters = [];
     $client->post("Host/UINotify", array_merge($this->getDefaultNotifyParameters()->getWrappedObject(), $parameters, ['hostId' => $this->getPrimaryKeyValue(), 'message' => $message]))->shouldBeCalled()->willReturn(Helper::zeroResponse());
     $this->UINotify($message)->shouldBe(0);
 }
Exemple #2
0
 public function it_should_throw_on_logout_if_user_not_logged_in(HttpClient $client)
 {
     $client->get('Users/GetLoginState', ['userId' => $this->getPrimaryKeyValue()])->shouldBeCalled()->willReturn(Helper::zeroResponse());
     $this->shouldThrow('\\Pisa\\GizmoAPI\\Exceptions\\RequirementException')->duringLogout();
 }