From 9945e96620e757be7b32d61c66313404421bbfc3 Mon Sep 17 00:00:00 2001 From: Caen De Silva Date: Wed, 28 Dec 2022 21:37:18 +0100 Subject: [PATCH] Indent warning message empty collections --- .../src/Console/Commands/MakePublicationCommand.php | 2 +- .../Feature/Commands/MakePublicationCommandTest.php | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/packages/framework/src/Console/Commands/MakePublicationCommand.php b/packages/framework/src/Console/Commands/MakePublicationCommand.php index b307c8e5b49..d741356b35e 100644 --- a/packages/framework/src/Console/Commands/MakePublicationCommand.php +++ b/packages/framework/src/Console/Commands/MakePublicationCommand.php @@ -218,7 +218,7 @@ protected function handleEmptyOptionsCollection(PublicationField $field, string } $this->newLine(); - $this->warn("Warning: $message"); + $this->warn(" Warning: $message"); if ($this->confirm('Would you like to skip this field?', true)) { return null; } else { diff --git a/packages/framework/tests/Feature/Commands/MakePublicationCommandTest.php b/packages/framework/tests/Feature/Commands/MakePublicationCommandTest.php index 74527957b9f..09d3a4f9f3e 100644 --- a/packages/framework/tests/Feature/Commands/MakePublicationCommandTest.php +++ b/packages/framework/tests/Feature/Commands/MakePublicationCommandTest.php @@ -317,7 +317,7 @@ public function test_image_input_with_no_images() ]); $this->artisan('make:publication test-publication') - ->expectsOutput('Warning: No media files found in directory _media/test-publication/') + ->expectsOutput(' Warning: No media files found in directory _media/test-publication/') ->expectsConfirmation('Would you like to skip this field?') ->expectsOutput('Error: Unable to locate any media files for this publication type') ->assertExitCode(1); @@ -337,7 +337,7 @@ public function test_image_input_with_no_images_but_skips() ]); $this->artisan('make:publication test-publication') - ->expectsOutput('Warning: No media files found in directory _media/test-publication/') + ->expectsOutput(' Warning: No media files found in directory _media/test-publication/') ->expectsConfirmation('Would you like to skip this field?', 'yes') ->doesntExpectOutput('Error: Unable to locate any media files for this publication type') ->assertExitCode(0); @@ -359,7 +359,7 @@ public function test_tag_input_with_no_tags() ]); $this->artisan('make:publication test-publication') - ->expectsOutput('Warning: No tags for this publication type found in tags.json') + ->expectsOutput(' Warning: No tags for this publication type found in tags.json') ->expectsConfirmation('Would you like to skip this field?') ->expectsOutput('Error: Unable to locate any tags for this publication type') ->assertExitCode(1); @@ -379,7 +379,7 @@ public function test_tag_input_with_no_tags_but_skips() ]); $this->artisan('make:publication test-publication') - ->expectsOutput('Warning: No tags for this publication type found in tags.json') + ->expectsOutput(' Warning: No tags for this publication type found in tags.json') ->expectsConfirmation('Would you like to skip this field?', 'yes') ->doesntExpectOutput('Error: Unable to locate any tags for this publication type') ->assertExitCode(0); @@ -402,7 +402,7 @@ public function test_handleEmptyOptionsCollection_for_required_field() ]); $this->artisan('make:publication test-publication') - ->doesntExpectOutput('Warning: No tags for this publication type found in tags.json') + ->doesntExpectOutput(' Warning: No tags for this publication type found in tags.json') ->expectsOutput('Error: Unable to create publication: No tags for this publication type found in tags.json') ->assertExitCode(1); }