Skip to content

Commit

Permalink
Move stubs to its folders (#15)
Browse files Browse the repository at this point in the history
  • Loading branch information
Jampire authored May 26, 2023
1 parent 6ace9a7 commit 0ab1a87
Show file tree
Hide file tree
Showing 11 changed files with 9 additions and 11 deletions.
1 change: 0 additions & 1 deletion Roadmap.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
- implement impersonation permission
- implement which users are allowed to be impersonated
- log of user switching
- implement `database` provider
3 changes: 1 addition & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,7 @@
},
"autoload-dev": {
"psr-4": {
"Jampire\\MoonshineImpersonate\\Tests\\": "tests/",
"Jampire\\MoonshineImpersonate\\Database\\Factories\\": "database/factories"
"Jampire\\MoonshineImpersonate\\Tests\\": "tests/"
}
},
"conflict": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

declare(strict_types=1);

namespace Jampire\MoonshineImpersonate\Database\Factories;
namespace Jampire\MoonshineImpersonate\Tests\Stubs\Database\Factories;

use Illuminate\Database\Eloquent\Factories\Factory;
use Illuminate\Support\Facades\Hash;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

declare(strict_types=1);

namespace Jampire\MoonshineImpersonate\Database\Factories;
namespace Jampire\MoonshineImpersonate\Tests\Stubs\Database\Factories;

use Illuminate\Support\Facades\Hash;
use Illuminate\Support\Str;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

declare(strict_types=1);

namespace Jampire\MoonshineImpersonate\Database\Factories;
namespace Jampire\MoonshineImpersonate\Tests\Stubs\Database\Factories;

use Illuminate\Support\Facades\Hash;
use Illuminate\Support\Str;
Expand Down
2 changes: 1 addition & 1 deletion tests/Stubs/Models/MoonshineUser.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

namespace Jampire\MoonshineImpersonate\Tests\Stubs\Models;

use Jampire\MoonshineImpersonate\Database\Factories\MoonshineUserFactory;
use Jampire\MoonshineImpersonate\Tests\Stubs\Database\Factories\MoonshineUserFactory;
use MoonShine\Models\MoonshineUser as BaseUser;

/**
Expand Down
2 changes: 1 addition & 1 deletion tests/Stubs/Models/NonLogUser.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Foundation\Auth\User as BaseUser;
use Jampire\MoonshineImpersonate\Database\Factories\NonLogUserFactory;
use Jampire\MoonshineImpersonate\Tests\Stubs\Database\Factories\NonLogUserFactory;

/**
* Class NonLogUser
Expand Down
2 changes: 1 addition & 1 deletion tests/Stubs/Models/User.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Foundation\Auth\User as BaseUser;
use Jampire\MoonshineImpersonate\Database\Factories\UserFactory;
use Jampire\MoonshineImpersonate\Tests\Stubs\Database\Factories\UserFactory;
use MoonShine\Traits\Models\HasMoonShineChangeLog;

/**
Expand Down
4 changes: 2 additions & 2 deletions tests/TestCase.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@ protected function getPackageProviders($app): array

protected function getEnvironmentSetUp($app): void
{
include_once __DIR__.'/../database/migrations/create_moonshine_users_table.php';
include_once __DIR__.'/../database/migrations/create_moonshine_change_logs_table.php';
include_once __DIR__.'/Stubs/Database/Migrations/create_moonshine_users_table.php';
include_once __DIR__.'/Stubs/Database/Migrations/create_moonshine_change_logs_table.php';

(new \CreateMoonShineUsersTable())->up();
(new \CreateMoonShineChangeLogsTable())->up();
Expand Down

0 comments on commit 0ab1a87

Please sign in to comment.