Skip to content
This repository was archived by the owner on Apr 9, 2024. It is now read-only.

Commit 53f75f8

Browse files
authored
Merge pull request #142 from iamgergo/master
[6.x] Apply Laravel's cleaner import approach
2 parents 26b3012 + bf19c3c commit 53f75f8

File tree

2 files changed

+12
-5
lines changed

2 files changed

+12
-5
lines changed

database/factories/ModelFactory.php

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,22 @@
11
<?php
22

3+
/** @var \Illuminate\Database\Eloquent\Factory $factory */
4+
5+
use App\User;
6+
use Faker\Generator as Faker;
7+
38
/*
49
|--------------------------------------------------------------------------
510
| Model Factories
611
|--------------------------------------------------------------------------
712
|
8-
| Here you may define all of your model factories. Model factories give
9-
| you a convenient way to create models for testing and seeding your
10-
| database. Just tell the factory how a default model should look.
13+
| This directory should contain each of the model factory definitions for
14+
| your application. Factories provide a convenient way to generate new
15+
| model instances for testing / seeding your application's database.
1116
|
1217
*/
1318

14-
$factory->define(App\User::class, function (Faker\Generator $faker) {
19+
$factory->define(User::class, function (Faker $faker) {
1520
return [
1621
'name' => $faker->name,
1722
'email' => $faker->email,

tests/TestCase.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
<?php
22

3-
abstract class TestCase extends Laravel\Lumen\Testing\TestCase
3+
use Laravel\Lumen\Testing\TestCase as BaseTestCase;
4+
5+
abstract class TestCase extends BaseTestCase
46
{
57
/**
68
* Creates the application.

0 commit comments

Comments
 (0)