mirror of
https://github.com/archtechx/tenancy.git
synced 2026-02-05 19:34:04 +00:00
function improvements
This commit is contained in:
parent
55560563b5
commit
bbb8865b45
1 changed files with 3 additions and 3 deletions
|
|
@ -2,16 +2,16 @@
|
||||||
|
|
||||||
use Stancl\Tenancy\Tests\TestCase;
|
use Stancl\Tenancy\Tests\TestCase;
|
||||||
|
|
||||||
uses(TestCase::class)->in(...filesAndFolder());
|
uses(TestCase::class)->in(...filesAndFoldersExcluding(['WithoutTenancy']));
|
||||||
|
|
||||||
function pest(): \Orchestra\Testbench\TestCase
|
function pest(): \Orchestra\Testbench\TestCase
|
||||||
{
|
{
|
||||||
return Pest\TestSuite::getInstance()->test;
|
return Pest\TestSuite::getInstance()->test;
|
||||||
}
|
}
|
||||||
|
|
||||||
function filesAndFolder(): array
|
function filesAndFoldersExcluding(array $exclude = []): array
|
||||||
{
|
{
|
||||||
$dirs = scandir(__DIR__);
|
$dirs = scandir(__DIR__);
|
||||||
|
|
||||||
return array_filter($dirs, fn($dir) => ! in_array($dir, ['.', '..', 'WithoutTenancy'], true));
|
return array_filter($dirs, fn($dir) => ! in_array($dir, array_merge(['.', '..'], $exclude) , true));
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue