public function it_should_check_if_session_exists(HttpClient $client) { $id = 2; $options = ['$filter' => $this->criteriaToFilter(['Id' => $id]), '$skip' => 0, '$top' => 1]; $client->get('Sessions/Get', $options)->shouldBeCalled()->willReturn(Helper::contentResponse([Helper::fakeSession()])); $this->has($id)->shouldReturn(true); $client->get('Sessions/Get', $options)->shouldBeCalled()->willReturn(Helper::emptyArrayResponse()); $this->has($id)->shouldReturn(false); }