Skip to content

Commit 4220d34

Browse files
committed
test: split table expectations for Laravel 10 and 11+ due to missing tables
1 parent 390a432 commit 4220d34

File tree

3 files changed

+5
-16
lines changed

3 files changed

+5
-16
lines changed

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,6 @@
44
build/
55
composer.lock
66
.phpunit.result.cache
7-
.clover.xml
7+
/coverage/clover.xml
88
.hadolint.yaml
99
.yamllint.yaml

tests/Integration/Service/Generator/Definition/TableDefinitionTest.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -253,16 +253,16 @@ public function testFloatIsCorrect(array $result): void
253253
if (str_starts_with(Application::VERSION, '10.')) {
254254
$this->assertSame(
255255
[
256-
'total' => 10,
257-
'places' => 0,
256+
'total' => 6,
257+
'places' => 2,
258258
],
259259
$field->getArguments()
260260
);
261261
} else {
262262
$this->assertSame(
263263
[
264-
'total' => 6,
265-
'places' => 2,
264+
'total' => 10,
265+
'places' => 0,
266266
],
267267
$field->getArguments()
268268
);

tests/Integration/Service/Parser/SchemaParserTest.php

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -28,15 +28,10 @@ public function testGetTablesFromSchemaWorks(): void
2828
$expectedTables = match (true) {
2929
str_starts_with($laravelVersion, '10.') => [
3030
'abc',
31-
'cache',
32-
'cache_locks',
3331
'failed_jobs',
3432
'fields_test',
3533
'foreign_table',
36-
'job_batches',
37-
'jobs',
3834
'password_reset_tokens',
39-
'sessions',
4035
'users',
4136
],
4237
default => [ // Laravel 11+ (Standard)
@@ -67,15 +62,10 @@ public function testGetSortedTablesFromSchema(): void
6762

6863
$expectedTables = match (true) {
6964
str_starts_with($laravelVersion, '10.') => [
70-
'cache',
71-
'cache_locks',
7265
'failed_jobs',
7366
'fields_test',
7467
'foreign_table',
75-
'job_batches',
76-
'jobs',
7768
'password_reset_tokens',
78-
'sessions',
7969
'users',
8070
'abc',
8171
],
@@ -88,7 +78,6 @@ public function testGetSortedTablesFromSchema(): void
8878
'job_batches',
8979
'jobs',
9080
'password_reset_tokens',
91-
'personal_access_tokens',
9281
'sessions',
9382
'users',
9483
'abc',

0 commit comments

Comments
 (0)