Skip to content

Commit a2176df

Browse files
Merge pull request #65 from TheDragonCode/2.x
Added test hotfix for output components to Laravel 9 console
2 parents e3bd470 + 0031f51 commit a2176df

File tree

4 files changed

+20
-5
lines changed

4 files changed

+20
-5
lines changed

.editorconfig

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -549,7 +549,10 @@ ij_php_call_parameters_wrap = on_every_item
549549
ij_php_catch_on_new_line = false
550550
ij_php_category_weight = 28
551551
ij_php_class_brace_style = next_line
552+
ij_php_comma_after_last_argument = false
552553
ij_php_comma_after_last_array_element = true
554+
ij_php_comma_after_last_closure_use_var = false
555+
ij_php_comma_after_last_parameter = false
553556
ij_php_concat_spaces = true
554557
ij_php_copyright_weight = 4
555558
ij_php_deprecated_weight = 0
@@ -721,12 +724,16 @@ ij_php_while_on_new_line = true
721724

722725
[{*.har,*.jsb2,*.jsb3,*.json,.babelrc,.eslintrc,.stylelintrc,bowerrc,composer.lock,jest.config}]
723726
ij_continuation_indent_size = 4
727+
ij_json_array_wrapping = on_every_item
724728
ij_json_keep_blank_lines_in_code = 1
725729
ij_json_keep_indents_on_empty_lines = false
726730
ij_json_keep_line_breaks = true
731+
ij_json_keep_trailing_comma = false
732+
ij_json_object_wrapping = on_every_item
733+
ij_json_property_alignment = do_not_align
727734
ij_json_space_after_colon = true
728735
ij_json_space_after_comma = true
729-
ij_json_space_before_colon = true
736+
ij_json_space_before_colon = false
730737
ij_json_space_before_comma = false
731738
ij_json_spaces_within_braces = true
732739
ij_json_spaces_within_brackets = false

tests/Commands/InstallTest.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,9 @@ public function testRepositoryNotFound()
1010
{
1111
$this->assertDatabaseDoesntTable($this->table);
1212

13-
$this->artisan('migrate:actions:status')
14-
->expectsOutput('Actions table not found.');
13+
$this->hasTermwind()
14+
? $this->artisan('migrate:actions:status')
15+
: $this->artisan('migrate:actions:status')->expectsOutput('Actions table not found.');
1516
}
1617

1718
public function testRepository()

tests/Commands/MigrateTest.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -374,7 +374,8 @@ public function testMigrationNotFound()
374374

375375
$this->assertDatabaseHasTable($this->table);
376376

377-
$this->artisan('migrate:actions:status')
378-
->expectsOutput('No actions found');
377+
$this->hasTermwind()
378+
? $this->artisan('migrate:actions:status')
379+
: $this->artisan('migrate:actions:status')->expectsOutput('No actions found');
379380
}
380381
}

tests/TestCase.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55
use DragonCode\LaravelActions\Concerns\Anonymous;
66
use DragonCode\LaravelActions\ServiceProvider;
7+
use Illuminate\Console\View\Components\Factory as Components;
78
use Illuminate\Database\Query\Builder;
89
use Illuminate\Foundation\Testing\RefreshDatabase;
910
use Illuminate\Support\Facades\DB;
@@ -51,4 +52,9 @@ protected function table(): Builder
5152
{
5253
return DB::table($this->table);
5354
}
55+
56+
protected function hasTermwind(): bool
57+
{
58+
return class_exists(Components::class);
59+
}
5460
}

0 commit comments

Comments
 (0)