Skip to content

Commit

Permalink
fixes test timestamp properties (laravel#46795)
Browse files Browse the repository at this point in the history
  • Loading branch information
cosmastech authored Apr 16, 2023
1 parent 3e5a6b3 commit 997218b
Show file tree
Hide file tree
Showing 6 changed files with 16 additions and 0 deletions.
1 change: 1 addition & 0 deletions tests/Database/DatabaseEloquentIntegrationTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -2345,6 +2345,7 @@ class EloquentTestFriendPivot extends Pivot
{
protected $table = 'friends';
protected $guarded = [];
public $timestamps = false;

public function user()
{
Expand Down
1 change: 1 addition & 0 deletions tests/Integration/Database/EloquentCollectionFreshTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ protected function defineDatabaseMigrationsAfterDatabaseRefreshed()
Schema::create('users', function (Blueprint $table) {
$table->increments('id');
$table->string('email');
$table->timestamps();
});
}

Expand Down
2 changes: 2 additions & 0 deletions tests/Integration/Database/EloquentCustomPivotCastTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,8 @@ public function collaborators()

class CustomPivotCastTestCollaborator extends Pivot
{
public $timestamps = false;

protected $attributes = [
'permissions' => '["create", "update"]',
];
Expand Down
2 changes: 2 additions & 0 deletions tests/Integration/Database/EloquentPivotEventsTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,8 @@ class PivotEventsTestCollaborator extends Pivot
{
public $table = 'project_users';

public $timestamps = false;

protected $casts = [
'permissions' => 'json',
];
Expand Down
4 changes: 4 additions & 0 deletions tests/Integration/Database/EloquentPivotSerializationTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
6 changes: 6 additions & 0 deletions tests/Integration/Database/EloquentPivotTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,8 @@ class PivotTestCollaborator extends Pivot
{
public $table = 'collaborators';

public $timestamps = false;

protected $casts = [
'permissions' => 'json',
];
Expand All @@ -138,6 +140,8 @@ class PivotTestContributor extends Pivot
{
public $table = 'contributors';

public $timestamps = false;

public $incrementing = true;

protected $casts = [
Expand All @@ -149,6 +153,8 @@ class PivotTestSubscription extends Pivot
{
public $table = 'subscriptions';

public $timestamps = false;

protected $attributes = [
'status' => 'active',
];
Expand Down

0 comments on commit 997218b

Please sign in to comment.