From c19b19bc0eed43d39b537a656096a5ba165197ff Mon Sep 17 00:00:00 2001 From: Luke Kuzmish Date: Sun, 16 Apr 2023 08:08:58 -0400 Subject: [PATCH] fixes test timestamp properties --- tests/Database/DatabaseEloquentIntegrationTest.php | 1 + tests/Integration/Database/EloquentCollectionFreshTest.php | 1 + tests/Integration/Database/EloquentCustomPivotCastTest.php | 2 ++ tests/Integration/Database/EloquentPivotEventsTest.php | 2 ++ .../Integration/Database/EloquentPivotSerializationTest.php | 4 ++++ tests/Integration/Database/EloquentPivotTest.php | 6 ++++++ 6 files changed, 16 insertions(+) diff --git a/tests/Database/DatabaseEloquentIntegrationTest.php b/tests/Database/DatabaseEloquentIntegrationTest.php index 0fe2e76f4ccf..a7225b2bb1ed 100644 --- a/tests/Database/DatabaseEloquentIntegrationTest.php +++ b/tests/Database/DatabaseEloquentIntegrationTest.php @@ -2345,6 +2345,7 @@ class EloquentTestFriendPivot extends Pivot { protected $table = 'friends'; protected $guarded = []; + public $timestamps = false; public function user() { diff --git a/tests/Integration/Database/EloquentCollectionFreshTest.php b/tests/Integration/Database/EloquentCollectionFreshTest.php index e1c59f7cafe5..30acc2597112 100644 --- a/tests/Integration/Database/EloquentCollectionFreshTest.php +++ b/tests/Integration/Database/EloquentCollectionFreshTest.php @@ -14,6 +14,7 @@ protected function defineDatabaseMigrationsAfterDatabaseRefreshed() Schema::create('users', function (Blueprint $table) { $table->increments('id'); $table->string('email'); + $table->timestamps(); }); } diff --git a/tests/Integration/Database/EloquentCustomPivotCastTest.php b/tests/Integration/Database/EloquentCustomPivotCastTest.php index 7a8cdce8c42c..1a116d37eb9d 100644 --- a/tests/Integration/Database/EloquentCustomPivotCastTest.php +++ b/tests/Integration/Database/EloquentCustomPivotCastTest.php @@ -171,6 +171,8 @@ public function collaborators() class CustomPivotCastTestCollaborator extends Pivot { + public $timestamps = false; + protected $attributes = [ 'permissions' => '["create", "update"]', ]; diff --git a/tests/Integration/Database/EloquentPivotEventsTest.php b/tests/Integration/Database/EloquentPivotEventsTest.php index ea72a019d387..36783f38d9b3 100644 --- a/tests/Integration/Database/EloquentPivotEventsTest.php +++ b/tests/Integration/Database/EloquentPivotEventsTest.php @@ -150,6 +150,8 @@ class PivotEventsTestCollaborator extends Pivot { public $table = 'project_users'; + public $timestamps = false; + protected $casts = [ 'permissions' => 'json', ]; diff --git a/tests/Integration/Database/EloquentPivotSerializationTest.php b/tests/Integration/Database/EloquentPivotSerializationTest.php index b3cbeaf0f031..00899762b7a0 100644 --- a/tests/Integration/Database/EloquentPivotSerializationTest.php +++ b/tests/Integration/Database/EloquentPivotSerializationTest.php @@ -182,9 +182,13 @@ public function projects() class PivotSerializationTestCollaborator extends Pivot { public $table = 'project_users'; + + public $timestamps = false; } class PivotSerializationTestTagAttachment extends MorphPivot { public $table = 'taggables'; + + public $timestamps = false; } diff --git a/tests/Integration/Database/EloquentPivotTest.php b/tests/Integration/Database/EloquentPivotTest.php index e673b459000d..72bd8a687fdb 100644 --- a/tests/Integration/Database/EloquentPivotTest.php +++ b/tests/Integration/Database/EloquentPivotTest.php @@ -129,6 +129,8 @@ class PivotTestCollaborator extends Pivot { public $table = 'collaborators'; + public $timestamps = false; + protected $casts = [ 'permissions' => 'json', ]; @@ -138,6 +140,8 @@ class PivotTestContributor extends Pivot { public $table = 'contributors'; + public $timestamps = false; + public $incrementing = true; protected $casts = [ @@ -149,6 +153,8 @@ class PivotTestSubscription extends Pivot { public $table = 'subscriptions'; + public $timestamps = false; + protected $attributes = [ 'status' => 'active', ];