This commit is contained in:
Ryan Chandler
2022-01-04 12:06:56 +00:00
commit 3e708cf4c5
33 changed files with 938 additions and 0 deletions

5
tests/ExampleTest.php Normal file
View File

@@ -0,0 +1,5 @@
<?php
it('can test', function () {
expect(true)->toBeTrue();
});

5
tests/Pest.php Normal file
View File

@@ -0,0 +1,5 @@
<?php
use VendorName\Skeleton\Tests\TestCase;
uses(TestCase::class)->in(__DIR__);

36
tests/TestCase.php Normal file
View 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();
*/
}
}