File tree Expand file tree Collapse file tree 2 files changed +6
-4
lines changed
tests/fixtures/InitCommandTest Expand file tree Collapse file tree 2 files changed +6
-4
lines changed Original file line number Diff line number Diff line change 11use Illuminate\Database\Migrations\Migration;
2+ use Illuminate\Support\Facades\App;
23use Illuminate\Support\Facades\DB;
34use Illuminate\Support\Facades\Hash;
45use RonasIT\Support\Traits\MigrationTrait;
@@ -9,7 +10,7 @@ class AddDefaultUser extends Migration
910
1011 public function up()
1112 {
12- if (config('app.env') !== ' testing') {
13+ if (!App::environment(' testing') ) {
1314 DB::table('users')->insert([
1415 'name' => '{{ $name } } ',
1516 'email' => '{{ $email } } ',
@@ -21,7 +22,7 @@ public function up()
2122
2223 public function down()
2324 {
24- if (config('app.env') !== ' testing') {
25+ if (!App::environment(' testing') ) {
2526 DB::table('users')
2627 ->where('email', '{{ $email } } ')
2728 ->delete();
Original file line number Diff line number Diff line change 11<?php
22
33use Illuminate \Database \Migrations \Migration ;
4+ use Illuminate \Support \Facades \App ;
45use Illuminate \Support \Facades \DB ;
56use Illuminate \Support \Facades \Hash ;
67use RonasIT \Support \Traits \MigrationTrait ;
@@ -11,7 +12,7 @@ class AddDefaultUser extends Migration
1112
1213 public function up ()
1314 {
14- if (config ( ' app.env ' ) !== ' testing ' ) {
15+ if (!App:: environment ( ' testing ') ) {
1516 DB ::table ('users ' )->insert ([
1617 'name ' => 'TestAdmin ' ,
1718 'email ' => 'mail@mail.com ' ,
@@ -23,7 +24,7 @@ public function up()
2324
2425 public function down ()
2526 {
26- if (config ( ' app.env ' ) !== ' testing ' ) {
27+ if (!App:: environment ( ' testing ') ) {
2728 DB ::table ('users ' )
2829 ->where ('email ' , 'mail@mail.com ' )
2930 ->delete ();
You can’t perform that action at this time.
0 commit comments