diff --git a/app/Model/Account.php b/app/Model/Account.php index b03173f5..dcb0e6ef 100644 --- a/app/Model/Account.php +++ b/app/Model/Account.php @@ -8,12 +8,12 @@ namespace App\Model; -use App\Classes\Roles\Exceptions\InvalidRoleType; -use App\Classes\Roles\Interfaces\RoleInterface; -use App\Model\Concerns\ActivityFeed; use Carbon\Carbon; -use Illuminate\Database\Eloquent\Relations\HasMany; +use App\Model\Concerns\ActivityFeed; use Illuminate\Database\Eloquent\SoftDeletes; +use App\Classes\Roles\Interfaces\RoleInterface; +use App\Classes\Roles\Exceptions\InvalidRoleType; +use Illuminate\Database\Eloquent\Relations\HasMany; use Illuminate\Foundation\Auth\User as Authenticatable; /** diff --git a/database/factories/UserFactory.php b/database/factories/UserFactory.php index 0cfc3fea..4580d842 100644 --- a/database/factories/UserFactory.php +++ b/database/factories/UserFactory.php @@ -1,9 +1,9 @@ timestamps(); }); - Categories::create(['slug' => 'general', 'title' => 'General', 'status' => true, 'editor_id' => 1, 'creator_id' => 1]); Schema::create('articles', function (Blueprint $table) { diff --git a/database/migrations/2018_05_07_174354_may_update_one.php b/database/migrations/2018_05_07_174354_may_update_one.php index b9de8442..11038905 100644 --- a/database/migrations/2018_05_07_174354_may_update_one.php +++ b/database/migrations/2018_05_07_174354_may_update_one.php @@ -1,8 +1,8 @@ string('username')->after('id')->default(str_slug(Faker\Factory::create()->userName)); }); - foreach (Account::all() as $account) { $account->update(['username' => StringGenerator::stripEmail($account->email)]); } diff --git a/tests/Article/ArticleFrontendTest.php b/tests/Article/ArticleFrontendTest.php index b4ef1346..ac1f8a83 100644 --- a/tests/Article/ArticleFrontendTest.php +++ b/tests/Article/ArticleFrontendTest.php @@ -3,9 +3,9 @@ namespace Tests\Article; use Carbon\Carbon; -use Illuminate\Foundation\Testing\RefreshDatabase; -use Illuminate\Foundation\Testing\WithFaker; use Tests\TestCase; +use Illuminate\Foundation\Testing\WithFaker; +use Illuminate\Foundation\Testing\RefreshDatabase; class ArticleFrontendTest extends TestCase { diff --git a/tests/Config/ConfigFormTest.php b/tests/Config/ConfigFormTest.php index f00f66c7..1c06853f 100644 --- a/tests/Config/ConfigFormTest.php +++ b/tests/Config/ConfigFormTest.php @@ -2,10 +2,10 @@ namespace Tests\Feature; +use Tests\TestCase; use App\Model\Configuration; use Illuminate\Foundation\Testing\RefreshDatabase; use Illuminate\Foundation\Testing\WithoutMiddleware; -use Tests\TestCase; /** * Class ConfigTest. diff --git a/tests/TestCase.php b/tests/TestCase.php index 05c583f9..85bedbd3 100644 --- a/tests/TestCase.php +++ b/tests/TestCase.php @@ -2,17 +2,16 @@ namespace Tests; +use Mockery; use App\Exceptions\Handler; -use Illuminate\Contracts\Debug\ExceptionHandler; use Illuminate\Database\Eloquent\Collection; +use Illuminate\Contracts\Debug\ExceptionHandler; use Illuminate\Foundation\Testing\RefreshDatabase; use Illuminate\Foundation\Testing\TestCase as BaseTestCase; -use Mockery; abstract class TestCase extends BaseTestCase { use CreatesApplication; - use RefreshDatabase; protected function setUp()