function it_throws_exception_if_event_subject_is_not_customer_object(GenericEvent $event) { $event->getSubject()->willReturn('badObject')->shouldBeCalled(); $this->shouldThrow(new UnexpectedTypeException('badObject', ReviewerInterface::class))->during('removeCustomerReviews', [$event]); }