public function it_should_throw_on_set_user_group_if_model_doesnt_exist(HttpClient $client, Factory $factory) { $fakeUser = Helper::fakeUser(['Id' => null]); $this->beConstructedWith($client, $factory, $fakeUser); $newUserGroup = $this->getAttribute('GroupId')->getWrappedObject() + 1; $this->shouldThrow('\\Pisa\\GizmoAPI\\Exceptions\\RequirementException')->duringSetUserGroup($newUserGroup); $this->GroupId->shouldNotBe($newUserGroup); }