mirror of
https://github.com/filamentphp/plugin-skeleton.git
synced 2025-12-06 13:38:53 +08:00
init
This commit is contained in:
5
tests/ExampleTest.php
Normal file
5
tests/ExampleTest.php
Normal file
@@ -0,0 +1,5 @@
|
||||
<?php
|
||||
|
||||
it('can test', function () {
|
||||
expect(true)->toBeTrue();
|
||||
});
|
||||
5
tests/Pest.php
Normal file
5
tests/Pest.php
Normal file
@@ -0,0 +1,5 @@
|
||||
<?php
|
||||
|
||||
use VendorName\Skeleton\Tests\TestCase;
|
||||
|
||||
uses(TestCase::class)->in(__DIR__);
|
||||
36
tests/TestCase.php
Normal file
36
tests/TestCase.php
Normal file
@@ -0,0 +1,36 @@
|
||||
<?php
|
||||
|
||||
namespace VendorName\Skeleton\Tests;
|
||||
|
||||
use Illuminate\Database\Eloquent\Factories\Factory;
|
||||
use Orchestra\Testbench\TestCase as Orchestra;
|
||||
use VendorName\Skeleton\SkeletonServiceProvider;
|
||||
|
||||
class TestCase extends Orchestra
|
||||
{
|
||||
protected function setUp(): void
|
||||
{
|
||||
parent::setUp();
|
||||
|
||||
Factory::guessFactoryNamesUsing(
|
||||
fn (string $modelName) => 'VendorName\\Skeleton\\Database\\Factories\\'.class_basename($modelName).'Factory'
|
||||
);
|
||||
}
|
||||
|
||||
protected function getPackageProviders($app)
|
||||
{
|
||||
return [
|
||||
SkeletonServiceProvider::class,
|
||||
];
|
||||
}
|
||||
|
||||
public function getEnvironmentSetUp($app)
|
||||
{
|
||||
config()->set('database.default', 'testing');
|
||||
|
||||
/*
|
||||
$migration = include __DIR__.'/../database/migrations/create_skeleton_table.php.stub';
|
||||
$migration->up();
|
||||
*/
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user