Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[10.x] Fix $timestamps within test Models #46795

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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