Skip to content

Commit d913eab

Browse files
committed
fix: test linting in ci
1 parent 7ae5c2e commit d913eab

File tree

7 files changed

+18
-12
lines changed

7 files changed

+18
-12
lines changed

composer.json

+1
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,7 @@
7171
"pest --coverage"
7272
],
7373
"test": [
74+
"@test:lint",
7475
"@test:static",
7576
"@test:coverage"
7677
],

tests/Feature/Facades/SqlEntityTest.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22

33
declare(strict_types=1);
44

5-
use CalebDW\SqlEntities\SqlEntityManager;
65
use CalebDW\SqlEntities\Facades\SqlEntity;
6+
use CalebDW\SqlEntities\SqlEntityManager;
77

88
it('is a facade', function () {
99
expect(SqlEntity::getFacadeRoot())->toBeInstanceOf(SqlEntityManager::class);

tests/Unit/Grammars/GrammarTest.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44

55
use CalebDW\SqlEntities\Concerns\DefaultSqlEntityBehaviour;
66
use CalebDW\SqlEntities\Contracts\SqlEntity;
7-
use CalebDW\SqlEntities\View;
87
use CalebDW\SqlEntities\Grammars\Grammar;
8+
use CalebDW\SqlEntities\View;
99
use Illuminate\Database\Connection;
1010
use Illuminate\Database\Query\Builder;
1111

tests/Unit/Grammars/PostgresGrammarTest.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929

3030
$sql = test()->grammar->compileCreate(test()->entity);
3131

32-
expect($sql)->toBe(<<<SQL
32+
expect($sql)->toBe(<<<'SQL'
3333
CREATE RECURSIVE VIEW user_view AS
3434
SELECT id, name FROM users
3535

@@ -47,7 +47,7 @@
4747
4848
SQL);
4949
})->with([
50-
'one column' => [['id'], ' (id)'],
50+
'one column' => [['id'], ' (id)'],
5151
'two columns' => [['id', 'name'], ' (id, name)'],
5252
]);
5353

tests/Unit/Listeners/SyncEntitiesSubscriberTest.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,13 @@
22

33
declare(strict_types=1);
44

5-
use CalebDW\SqlEntities\SqlEntityManager;
65
use CalebDW\SqlEntities\Listeners\SyncSqlEntities;
6+
use CalebDW\SqlEntities\SqlEntityManager;
77
use Illuminate\Database\Events\MigrationsEnded;
88
use Illuminate\Database\Events\MigrationsStarted;
99

1010
beforeEach(function () {
11-
test()->manager = Mockery::mock(SqlEntityManager::class);
11+
test()->manager = Mockery::mock(SqlEntityManager::class);
1212
test()->listener = new SyncSqlEntities(test()->manager);
1313
});
1414

workbench/app/Models/User.php

+5-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
<?php
22

3+
declare(strict_types=1);
4+
35
namespace Workbench\App\Models;
46

57
// use Illuminate\Contracts\Auth\MustVerifyEmail;
@@ -10,7 +12,8 @@
1012
class User extends Authenticatable
1113
{
1214
/** @use HasFactory<\Workbench\Database\Factories\UserFactory> */
13-
use HasFactory, Notifiable;
15+
use HasFactory;
16+
use Notifiable;
1417

1518
/**
1619
* The attributes that are mass assignable.
@@ -42,7 +45,7 @@ protected function casts(): array
4245
{
4346
return [
4447
'email_verified_at' => 'datetime',
45-
'password' => 'hashed',
48+
'password' => 'hashed',
4649
];
4750
}
4851
}

workbench/database/factories/UserFactory.php

+6-4
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
<?php
22

3+
declare(strict_types=1);
4+
35
namespace Workbench\Database\Factories;
46

57
use Illuminate\Database\Eloquent\Factories\Factory;
@@ -34,11 +36,11 @@ class UserFactory extends Factory
3436
public function definition(): array
3537
{
3638
return [
37-
'name' => fake()->name(),
38-
'email' => fake()->unique()->safeEmail(),
39+
'name' => fake()->name(),
40+
'email' => fake()->unique()->safeEmail(),
3941
'email_verified_at' => now(),
40-
'password' => static::$password ??= Hash::make('password'),
41-
'remember_token' => Str::random(10),
42+
'password' => static::$password ??= Hash::make('password'),
43+
'remember_token' => Str::random(10),
4244
];
4345
}
4446

0 commit comments

Comments
 (0)