Skip to content

Commit ffd5019

Browse files
committed
tests fixed.
1 parent 28288d7 commit ffd5019

File tree

2 files changed

+39
-0
lines changed

2 files changed

+39
-0
lines changed

tests/Integration/Service/Generator/Compiler/MigrationCompilerTest.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,7 @@ public function testGenerateByResultWorksWithPrimaryKey(): void
6666
]
6767
);
6868
$this->compiler->generateByResult($result);
69+
6970
$result = $this->compiler->getRenderedTemplate();
7071
self::assertStringEqualsFile(
7172
$this->resourceFolder . '/ExpectedResults/migrationCompilerResultWithPrimary.txt',
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
<?php
2+
3+
use Illuminate\Database\Migrations\Migration;
4+
use Illuminate\Database\Schema\Blueprint;
5+
use Illuminate\Support\Facades\{Schema, DB};
6+
7+
return new class extends Migration
8+
{
9+
10+
/**
11+
* Run the migrations.
12+
*
13+
* @return void
14+
*/
15+
public function up(): void
16+
{
17+
Schema::create(
18+
'test_table',
19+
static function (Blueprint $table) {
20+
$table->bigInteger('test', true)->unsigned();
21+
$table->primary(['test'], 'PRIMARY');
22+
23+
}
24+
);
25+
}
26+
27+
28+
/**
29+
* Reverse the migrations.
30+
*
31+
* @return void
32+
*/
33+
public function down(): void
34+
{
35+
Schema::dropIfExists('test_table');
36+
}
37+
38+
};

0 commit comments

Comments
 (0)