Skip to content

Commit 68fc9f0

Browse files
committed
Skeleton cleanup
1 parent 0e07dc2 commit 68fc9f0

File tree

6 files changed

+49
-26
lines changed

6 files changed

+49
-26
lines changed

packages/skeleton/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ phpstan.neon
3030

3131
# Testbench
3232
testbench.yaml
33+
/workbench/*
3334

3435
# PHP CS Fixer
3536
.php-cs-fixer.cache

packages/skeleton/resources/lang/en/translations.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,5 @@
33
return [
44

55
'skeleton' => 'Skeleton',
6-
'item' => 'Item',
7-
'items' => 'Items',
86

97
];

packages/skeleton/resources/lang/es/translations.php

Lines changed: 0 additions & 7 deletions
This file was deleted.

packages/skeleton/resources/lang/ru/translations.php

Lines changed: 0 additions & 7 deletions
This file was deleted.
Lines changed: 47 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,59 @@
11
<?php
22

3-
namespace Moox\Skeleton\Tests;
3+
namespace VendorName\Skeleton\Tests;
44

5-
use Orchestra\Testbench\Concerns\WithWorkbench;
5+
use Illuminate\Database\Eloquent\Factories\Factory;
6+
use Moox\Skeleton\SkeletonServiceProvider;
67
use Orchestra\Testbench\TestCase as Orchestra;
7-
use Workbench\App\Models\User;
88

9-
abstract class TestCase extends Orchestra
9+
class TestCase extends Orchestra
1010
{
11-
use WithWorkbench;
12-
1311
protected function setUp(): void
1412
{
1513
parent::setUp();
16-
$this->artisan('migrate');
17-
$this->actingAs(User::factory()->create());
14+
15+
Factory::guessFactoryNamesUsing(
16+
fn (string $modelName) => 'VendorName\\Skeleton\\Database\\Factories\\'.class_basename($modelName).'Factory'
17+
);
1818
}
1919

20-
protected function getEnvironmentSetUp($app) {}
20+
protected function getPackageProviders($app)
21+
{
22+
return [
23+
SkeletonServiceProvider::class,
24+
];
25+
}
26+
27+
public function getEnvironmentSetUp($app)
28+
{
29+
config()->set('database.default', 'testing');
30+
31+
/*
32+
$migration = include __DIR__.'/../database/migrations/create_skeleton_table.php.stub';
33+
$migration->up();
34+
*/
35+
}
36+
37+
protected function setUpTestUser(): void
38+
{
39+
/*
40+
$this->app['db']->connection()->getSchemaBuilder()->create('users', function (Blueprint $table) {
41+
$table->id();
42+
$table->string('name');
43+
$table->string('email')->unique();
44+
$table->string('password');
45+
$table->timestamps();
46+
});
47+
48+
$user = new class extends User {
49+
protected $table = 'users';
50+
};
51+
52+
$user::create([
53+
'name' => 'Test User',
54+
'email' => '[email protected]',
55+
'password' => bcrypt('password'),
56+
]);
57+
*/
58+
}
2159
}

public/css/filament/filament/app.css

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)