Skip to content

Commit

Permalink
refactor: add Models and migrations to test folder because are not pa…
Browse files Browse the repository at this point in the history
…rt of the src, they are just for testing
  • Loading branch information
WatheqAlshowaiter committed Aug 26, 2024
1 parent 055fb96 commit aeaa476
Show file tree
Hide file tree
Showing 8 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion src/BackupTablesServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ public function boot()
{
// This migration works only in the package test
if ($this->app->runningInConsole() && $this->app->environment() === 'testing') {
$this->loadMigrationsFrom(__DIR__.'/../database/migrations');
$this->loadMigrationsFrom(__DIR__.'/../tests/database/migrations');
}
}
}
6 changes: 3 additions & 3 deletions tests/BackupTablesTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@
use Illuminate\Support\Str;
use WatheqAlshowaiter\BackupTables\BackupTables;
use WatheqAlshowaiter\BackupTables\Constants;
use WatheqAlshowaiter\BackupTables\Models\Father;
use WatheqAlshowaiter\BackupTables\Models\Mother;
use WatheqAlshowaiter\BackupTables\Models\Son;
use WatheqAlshowaiter\BackupTables\Tests\Models\Father;
use WatheqAlshowaiter\BackupTables\Tests\Models\Mother;
use WatheqAlshowaiter\BackupTables\Tests\Models\Son;

class BackupTablesTest extends TestCase
{
Expand Down
2 changes: 1 addition & 1 deletion src/Models/Father.php → tests/Models/Father.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

namespace WatheqAlshowaiter\BackupTables\Models;
namespace WatheqAlshowaiter\BackupTables\Tests\Models;

use Illuminate\Database\Eloquent\Model;

Expand Down
2 changes: 1 addition & 1 deletion src/Models/Mother.php → tests/Models/Mother.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

namespace WatheqAlshowaiter\BackupTables\Models;
namespace WatheqAlshowaiter\BackupTables\Tests\Models;

use Illuminate\Database\Eloquent\Model;

Expand Down
2 changes: 1 addition & 1 deletion src/Models/Son.php → tests/Models/Son.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

namespace WatheqAlshowaiter\BackupTables\Models;
namespace WatheqAlshowaiter\BackupTables\Tests\Models;

use Illuminate\Database\Eloquent\Model;

Expand Down

0 comments on commit aeaa476

Please sign in to comment.