diff --git a/app/Commands/Crud/stubs/tests/belongsTo.stub b/app/Commands/Crud/stubs/tests/belongsTo.stub index fd06882..7226acf 100644 --- a/app/Commands/Crud/stubs/tests/belongsTo.stub +++ b/app/Commands/Crud/stubs/tests/belongsTo.stub @@ -1,7 +1,7 @@ /** @test */ public function it_belongs_to_DummyRelationName() { - $DummyRelationName = factory(\DummyRootNamespaceDummyRelationModelName::class)->create(); - $DummyModelName = factory(\DummyRootNamespaceDummyModelName::class)->create(['DummyForeignKeyName' => DummyLocalKeyName]); + $DummyRelationName = \DummyRootNamespaceDummyRelationModelName::factory()->create(); + $DummyModelName = \DummyRootNamespaceDummyModelName::factory()->create(['DummyForeignKeyName' => DummyLocalKeyName]); $this->assertInstanceOf(\DummyRootNamespaceDummyRelationModelName::class, $DummyModelName->DummyRelationName); } \ No newline at end of file diff --git a/app/Commands/Crud/stubs/tests/hasMany.stub b/app/Commands/Crud/stubs/tests/hasMany.stub index 2fe9248..5b3daf3 100644 --- a/app/Commands/Crud/stubs/tests/hasMany.stub +++ b/app/Commands/Crud/stubs/tests/hasMany.stub @@ -1,7 +1,7 @@ /** @test */ public function it_has_many_DummyRelationName() { - $DummyModelName = factory(\DummyRootNamespaceDummyModelName::class)->create(); - $DummyRelationName = factory(\DummyRootNamespaceDummyRelationModelName::class)->create(['DummyForeignKeyName' => DummyLocalKeyName]); + $DummyModelName = \DummyRootNamespaceDummyModelName::factory()->create(); + $DummyRelationName = \DummyRootNamespaceDummyRelationModelName::factory()->create(['DummyForeignKeyName' => DummyLocalKeyName]); $this->assertInstanceOf(\Illuminate\Database\Eloquent\Collection::class, $DummyModelName->DummyRelationName); } \ No newline at end of file diff --git a/app/Commands/Crud/stubs/tests/hasOne.stub b/app/Commands/Crud/stubs/tests/hasOne.stub index 7067c64..cafe0f3 100644 --- a/app/Commands/Crud/stubs/tests/hasOne.stub +++ b/app/Commands/Crud/stubs/tests/hasOne.stub @@ -1,7 +1,7 @@ /** @test */ public function it_has_only_one_DummyRelationName() { - $DummyModelName = factory(\DummyRootNamespaceDummyModelName::class)->create(); - $DummyRelationName = factory(\DummyRootNamespaceDummyRelationModelName::class)->create(['DummyForeignKeyName' => DummyLocalKeyName]); + $DummyModelName = \DummyRootNamespaceDummyModelName::factory()->create(); + $DummyRelationName = \DummyRootNamespaceDummyRelationModelName::factory()->create(['DummyForeignKeyName' => DummyLocalKeyName]); $this->assertInstanceOf(\DummyRootNamespaceDummyRelationModelName::class, $DummyModelName->DummyRelationName); } \ No newline at end of file diff --git a/app/Commands/Crud/stubs/tests/test-api.stub b/app/Commands/Crud/stubs/tests/test-api.stub index 895d9d4..f285ab6 100644 --- a/app/Commands/Crud/stubs/tests/test-api.stub +++ b/app/Commands/Crud/stubs/tests/test-api.stub @@ -12,7 +12,7 @@ class DummyClass extends TestCase public function create_DummyModelName($args = [], $num = null) { - return factory(DummyModelClass::class, $num)->create($args); + return DummyModelClass::factory(), $num)->create($args); } /** @test */ @@ -32,7 +32,7 @@ class DummyClass extends TestCase /** @test */ public function api_can_store_new_DummyModelName() { - $DummyModelName = factory(DummyModelClass::class)->make(['DummyModelFieldName'=>'Laravel']); + $DummyModelName = DummyModelClass::factory()->make(['DummyModelFieldName'=>'Laravel']); $this->postJson(route('DummyModelName.store'), $DummyModelName->toArray()) ->assertStatus(201); $this->assertDatabaseHas('DummyPluralModelName', ['DummyModelFieldName'=>'Laravel']); diff --git a/app/Commands/Crud/stubs/tests/test-web.stub b/app/Commands/Crud/stubs/tests/test-web.stub index 861244e..45e4efd 100644 --- a/app/Commands/Crud/stubs/tests/test-web.stub +++ b/app/Commands/Crud/stubs/tests/test-web.stub @@ -12,7 +12,7 @@ class DummyClass extends TestCase public function create_DummyModelName($args = [], $num = null) { - return factory(DummyModelClass::class, $num)->create($args); + return DummyModelClass::factory()->count($num)->create($args); } /** @test */ @@ -35,7 +35,7 @@ class DummyClass extends TestCase /** @test */ public function user_can_store_new_DummyModelName() { - $DummyModelName = factory(DummyModelClass::class)->make(['DummyModelFieldName'=>'Laravel']); + $DummyModelName = DummyModelClass::factory()->make(['DummyModelFieldName'=>'Laravel']); $this->post(route('DummyModelName.store'), $DummyModelName->toArray()) ->assertRedirect(route('DummyModelName.index')) ->assertSessionHas(['message']); diff --git a/builds/packr b/builds/packr index b83e8ad..83dd042 100755 Binary files a/builds/packr and b/builds/packr differ diff --git a/config/app.php b/config/app.php index 3b5d5e8..93df5fa 100644 --- a/config/app.php +++ b/config/app.php @@ -25,7 +25,7 @@ | */ - 'version' => 'v4.7.2', + 'version' => 'v4.7.3', /* |--------------------------------------------------------------------------