/** * Init the mocks */ public function setUp() { $faker = Factory::create(); $this->user = new UndefinedApplicationUser(\Mockery::mock(Account::class)); $this->message = \Mockery::mock(Message::class); $this->contextValue = 'contextValue'; $this->context = \Mockery::mock(Context::class); $this->context->shouldReceive('getValue')->andReturn($this->contextValue); $this->source = 'src'; $this->sourceMessage = \Mockery::mock(SourceMessage::class); $this->sourceMessage->shouldReceive('getSource')->andReturn($this->source); $this->event = new UnableToCreateUserEvent(new ApplicationUserId($faker->uuid), $this->user); $this->messageFinder = \Mockery::mock(MessageFinder::class); $this->factory = \Mockery::mock(MessageFactory::class); $this->messageSender = \Mockery::mock(MessageSender::class); $this->serviceUnderTest = new UnableToCreateUserEventHandler($this->messageFinder, $this->factory, $this->messageSender); }