diff --git a/tests/Stubs/Models/UserWithCustomOptimusConnection.php b/tests/Stubs/Models/UserWithCustomOptimusConnection.php index 4671516..a2b2e71 100644 --- a/tests/Stubs/Models/UserWithCustomOptimusConnection.php +++ b/tests/Stubs/Models/UserWithCustomOptimusConnection.php @@ -24,6 +24,6 @@ public function nestedUsers(): HasMany public function parentUser(): BelongsTo { - return$this->belongsTo(UserWithCustomOptimusConnection::class, 'parent_id'); + return $this->belongsTo(UserWithCustomOptimusConnection::class, 'parent_id'); } } diff --git a/tests/Stubs/Models/UserWithDefaultOptimusConnection.php b/tests/Stubs/Models/UserWithDefaultOptimusConnection.php index 7db30cc..f301ac4 100644 --- a/tests/Stubs/Models/UserWithDefaultOptimusConnection.php +++ b/tests/Stubs/Models/UserWithDefaultOptimusConnection.php @@ -22,6 +22,6 @@ public function nestedUsers(): HasMany public function parentUser(): BelongsTo { - return$this->belongsTo(UserWithDefaultOptimusConnection::class, 'parent_id'); + return $this->belongsTo(UserWithDefaultOptimusConnection::class, 'parent_id'); } } diff --git a/tests/Traits/OptimusEncodedRouteKeyTest.php b/tests/Traits/OptimusEncodedRouteKeyTest.php index 45daa4f..1ae0bd8 100644 --- a/tests/Traits/OptimusEncodedRouteKeyTest.php +++ b/tests/Traits/OptimusEncodedRouteKeyTest.php @@ -28,7 +28,7 @@ protected function setUp(): void parent::setUp(); $this->loadLaravelMigrations(config('database.default')); - $this->loadMigrationsFrom(__DIR__.'/../Stubs/Migrations'); + $this->loadMigrationsFrom(__DIR__.'/../database/migrations'); $this->configurePrimeNumbers(); } @@ -185,13 +185,13 @@ public function testExistingIntegerValuesBelow256AreResolved() * * @return \Cog\Tests\Laravel\Optimus\Stubs\Models\UserWithDefaultOptimusConnection */ - protected function createUserWithDefaultOptimusConnection(array $data = []): UserWithDefaultOptimusConnection + protected function createUserWithDefaultOptimusConnection(array $attributes = []): UserWithDefaultOptimusConnection { return UserWithDefaultOptimusConnection::create(array_merge([ 'name' => 'Default Test User', 'email' => 'test@user.com', 'password' => 'p4ssw0rd', - ], $data)); + ], $attributes)); } /** diff --git a/tests/Stubs/Migrations/2023_09_07_173419_add_parent_id_to_users_table.php b/tests/database/migrations/2023_09_07_173419_add_parent_id_to_users_table.php similarity index 65% rename from tests/Stubs/Migrations/2023_09_07_173419_add_parent_id_to_users_table.php rename to tests/database/migrations/2023_09_07_173419_add_parent_id_to_users_table.php index cf3cf78..3360442 100644 --- a/tests/Stubs/Migrations/2023_09_07_173419_add_parent_id_to_users_table.php +++ b/tests/database/migrations/2023_09_07_173419_add_parent_id_to_users_table.php @@ -1,23 +1,24 @@ foreignId('parent_id') - ->nullable(); + $table->foreignId('parent_id')->nullable(); }); } - public function down() + public function down(): void { Schema::table('users', function (Blueprint $table) { $table->dropColumn(['parent_id']); }); } -} +};