lastName)->toBe($lastName) ->and($vo->firstName)->toBe($firstName) ->and($vo->email)->toBe($email) ->and($vo->orderRef)->toBe($orderRef); }); it('throws exception if lastName is empty', function () { // GIVEN $lastName = ' '; // WHEN $action = fn () => getNewContactFormData([ 'lastName' => $lastName, ]); // THEN expect($action)->toThrow(\DomainException::class); }); it('throws exception if firstName is empty', function () { // GIVEN $firstName = ' '; // WHEN $action = fn () => getNewContactFormData([ 'firstName' => $firstName, ]); // THEN expect($action)->toThrow(\DomainException::class); }); it('throws exception if email is empty', function () { // GIVEN $email = ' '; // WHEN $action = fn () => getNewContactFormData([ 'email' => $email, ]); // THEN expect($action)->toThrow(\DomainException::class); }); it('throws exception if subject is empty', function () { // GIVEN $subject = ' '; // WHEN $action = fn () => getNewContactFormData([ 'subject' => $subject, ]); // THEN expect($action)->toThrow(\DomainException::class); }); it('throws exception if message is empty', function () { // GIVEN $message = ' '; // WHEN $action = fn () => getNewContactFormData([ 'message' => $message, ]); // THEN expect($action)->toThrow(\DomainException::class); }); });