Skip to content

Commit aeaa476

Browse files
refactor: add Models and migrations to test folder because are not part of the src, they are just for testing
1 parent 055fb96 commit aeaa476

8 files changed

+7
-7
lines changed

src/BackupTablesServiceProvider.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ public function boot()
1515
{
1616
// This migration works only in the package test
1717
if ($this->app->runningInConsole() && $this->app->environment() === 'testing') {
18-
$this->loadMigrationsFrom(__DIR__.'/../database/migrations');
18+
$this->loadMigrationsFrom(__DIR__.'/../tests/database/migrations');
1919
}
2020
}
2121
}

tests/BackupTablesTest.php

+3-3
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@
1010
use Illuminate\Support\Str;
1111
use WatheqAlshowaiter\BackupTables\BackupTables;
1212
use WatheqAlshowaiter\BackupTables\Constants;
13-
use WatheqAlshowaiter\BackupTables\Models\Father;
14-
use WatheqAlshowaiter\BackupTables\Models\Mother;
15-
use WatheqAlshowaiter\BackupTables\Models\Son;
13+
use WatheqAlshowaiter\BackupTables\Tests\Models\Father;
14+
use WatheqAlshowaiter\BackupTables\Tests\Models\Mother;
15+
use WatheqAlshowaiter\BackupTables\Tests\Models\Son;
1616

1717
class BackupTablesTest extends TestCase
1818
{

src/Models/Father.php tests/Models/Father.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?php
22

3-
namespace WatheqAlshowaiter\BackupTables\Models;
3+
namespace WatheqAlshowaiter\BackupTables\Tests\Models;
44

55
use Illuminate\Database\Eloquent\Model;
66

src/Models/Mother.php tests/Models/Mother.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?php
22

3-
namespace WatheqAlshowaiter\BackupTables\Models;
3+
namespace WatheqAlshowaiter\BackupTables\Tests\Models;
44

55
use Illuminate\Database\Eloquent\Model;
66

src/Models/Son.php tests/Models/Son.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?php
22

3-
namespace WatheqAlshowaiter\BackupTables\Models;
3+
namespace WatheqAlshowaiter\BackupTables\Tests\Models;
44

55
use Illuminate\Database\Eloquent\Model;
66

0 commit comments

Comments
 (0)