Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move stubs to its folders #15

Merged
merged 1 commit into from
May 26, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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