Skip to content

Commit

Permalink
[10.x] Test Improvements
Browse files Browse the repository at this point in the history
Use available method from `RefreshDatabase::afterRefreshingDatabase()`

Signed-off-by: Mior Muhammad Zaki <crynobone@gmail.com>
  • Loading branch information
crynobone committed Nov 28, 2023
1 parent 50807db commit 597c515
Show file tree
Hide file tree
Showing 75 changed files with 75 additions and 75 deletions.
2 changes: 1 addition & 1 deletion tests/Integration/Database/DatabaseCustomCastsTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

class DatabaseCustomCastsTest extends DatabaseTestCase
{
protected function defineDatabaseMigrationsAfterDatabaseRefreshed()
protected function afterRefreshingDatabase()
{
Schema::create('test_eloquent_model_with_custom_casts', function (Blueprint $table) {
$table->increments('id');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

class DatabaseEloquentBroadcastingTest extends DatabaseTestCase
{
protected function defineDatabaseMigrationsAfterDatabaseRefreshed()
protected function afterRefreshingDatabase()
{
Schema::create('test_eloquent_broadcasting_users', function (Blueprint $table) {
$table->increments('id');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

class DatabaseEloquentModelAttributeCastingTest extends DatabaseTestCase
{
protected function defineDatabaseMigrationsAfterDatabaseRefreshed()
protected function afterRefreshingDatabase()
{
Schema::create('test_eloquent_model_with_custom_casts', function (Blueprint $table) {
$table->increments('id');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

class DatabaseEloquentModelCustomCastingTest extends DatabaseTestCase
{
protected function defineDatabaseMigrationsAfterDatabaseRefreshed()
protected function afterRefreshingDatabase()
{
Schema::create('test_eloquent_model_with_custom_casts', function (Blueprint $table) {
$table->increments('id');
Expand Down
2 changes: 1 addition & 1 deletion tests/Integration/Database/EloquentAggregateTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

class EloquentAggregateTest extends DatabaseTestCase
{
protected function defineDatabaseMigrationsAfterDatabaseRefreshed()
protected function afterRefreshingDatabase()
{
Schema::create('users', function (Blueprint $table) {
$table->increments('id');
Expand Down
2 changes: 1 addition & 1 deletion tests/Integration/Database/EloquentBelongsToManyTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ protected function tearDown(): void
Carbon::setTestNow(null);
}

protected function defineDatabaseMigrationsAfterDatabaseRefreshed()
protected function afterRefreshingDatabase()
{
Schema::create('users', function (Blueprint $table) {
$table->increments('id');
Expand Down
2 changes: 1 addition & 1 deletion tests/Integration/Database/EloquentBelongsToTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

class EloquentBelongsToTest extends DatabaseTestCase
{
protected function defineDatabaseMigrationsAfterDatabaseRefreshed()
protected function afterRefreshingDatabase()
{
Schema::create('users', function (Blueprint $table) {
$table->increments('id');
Expand Down
2 changes: 1 addition & 1 deletion tests/Integration/Database/EloquentCollectionFreshTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

class EloquentCollectionFreshTest extends DatabaseTestCase
{
protected function defineDatabaseMigrationsAfterDatabaseRefreshed()
protected function afterRefreshingDatabase()
{
Schema::create('users', function (Blueprint $table) {
$table->increments('id');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

class EloquentCollectionLoadCountTest extends DatabaseTestCase
{
protected function defineDatabaseMigrationsAfterDatabaseRefreshed()
protected function afterRefreshingDatabase()
{
Schema::create('posts', function (Blueprint $table) {
$table->increments('id');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

class EloquentCollectionLoadMissingTest extends DatabaseTestCase
{
protected function defineDatabaseMigrationsAfterDatabaseRefreshed()
protected function afterRefreshingDatabase()
{
Schema::create('users', function (Blueprint $table) {
$table->increments('id');
Expand Down
2 changes: 1 addition & 1 deletion tests/Integration/Database/EloquentCursorPaginateTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

class EloquentCursorPaginateTest extends DatabaseTestCase
{
protected function defineDatabaseMigrationsAfterDatabaseRefreshed()
protected function afterRefreshingDatabase()
{
Schema::create('test_posts', function (Blueprint $table) {
$table->increments('id');
Expand Down
2 changes: 1 addition & 1 deletion tests/Integration/Database/EloquentCustomPivotCastTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

class EloquentCustomPivotCastTest extends DatabaseTestCase
{
protected function defineDatabaseMigrationsAfterDatabaseRefreshed()
protected function afterRefreshingDatabase()
{
Schema::create('users', function (Blueprint $table) {
$table->increments('id');
Expand Down
2 changes: 1 addition & 1 deletion tests/Integration/Database/EloquentDeleteTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

class EloquentDeleteTest extends DatabaseTestCase
{
protected function defineDatabaseMigrationsAfterDatabaseRefreshed()
protected function afterRefreshingDatabase()
{
Schema::create('posts', function (Blueprint $table) {
$table->increments('id');
Expand Down
2 changes: 1 addition & 1 deletion tests/Integration/Database/EloquentHasManyTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

class EloquentHasManyTest extends DatabaseTestCase
{
protected function defineDatabaseMigrationsAfterDatabaseRefreshed()
protected function afterRefreshingDatabase()
{
Schema::create('eloquent_has_many_test_users', function ($table) {
$table->id();
Expand Down
2 changes: 1 addition & 1 deletion tests/Integration/Database/EloquentHasManyThroughTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

class EloquentHasManyThroughTest extends DatabaseTestCase
{
protected function defineDatabaseMigrationsAfterDatabaseRefreshed()
protected function afterRefreshingDatabase()
{
Schema::create('users', function (Blueprint $table) {
$table->increments('id');
Expand Down
2 changes: 1 addition & 1 deletion tests/Integration/Database/EloquentHasOneIsTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

class EloquentHasOneIsTest extends DatabaseTestCase
{
protected function defineDatabaseMigrationsAfterDatabaseRefreshed()
protected function afterRefreshingDatabase()
{
Schema::create('posts', function (Blueprint $table) {
$table->increments('id');
Expand Down
2 changes: 1 addition & 1 deletion tests/Integration/Database/EloquentHasOneOfManyTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ class EloquentHasOneOfManyTest extends DatabaseTestCase
{
public $retrievedLogins;

protected function defineDatabaseMigrationsAfterDatabaseRefreshed()
protected function afterRefreshingDatabase()
{
Schema::create('users', function ($table) {
$table->id();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

class EloquentLazyEagerLoadingTest extends DatabaseTestCase
{
protected function defineDatabaseMigrationsAfterDatabaseRefreshed()
protected function afterRefreshingDatabase()
{
Schema::create('one', function (Blueprint $table) {
$table->increments('id');
Expand Down
2 changes: 1 addition & 1 deletion tests/Integration/Database/EloquentMassPrunableTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ protected function setUp(): void
$container->alias(Dispatcher::class, 'events');
}

protected function defineDatabaseMigrationsAfterDatabaseRefreshed()
protected function afterRefreshingDatabase()
{
collect([
'mass_prunable_test_models',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ protected function setUp(): void
});
}

protected function defineDatabaseMigrationsAfterDatabaseRefreshed()
protected function afterRefreshingDatabase()
{
Schema::create('test_model1', function (Blueprint $table) {
$table->increments('id');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

class EloquentModelDateCastingTest extends DatabaseTestCase
{
protected function defineDatabaseMigrationsAfterDatabaseRefreshed()
protected function afterRefreshingDatabase()
{
Schema::create('test_model1', function (Blueprint $table) {
$table->increments('id');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

class EloquentModelDecimalCastingTest extends DatabaseTestCase
{
protected function defineDatabaseMigrationsAfterDatabaseRefreshed()
protected function afterRefreshingDatabase()
{
Schema::create('test_model1', function (Blueprint $table) {
$table->increments('id');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ protected function setUp(): void
Model::$encrypter = null;
}

protected function defineDatabaseMigrationsAfterDatabaseRefreshed()
protected function afterRefreshingDatabase()
{
Schema::create('encrypted_casts', function (Blueprint $table) {
$table->increments('id');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

class EloquentModelEnumCastingTest extends DatabaseTestCase
{
protected function defineDatabaseMigrationsAfterDatabaseRefreshed()
protected function afterRefreshingDatabase()
{
Schema::create('enum_casts', function (Blueprint $table) {
$table->increments('id');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

class EloquentModelHashedCastingTest extends DatabaseTestCase
{
protected function defineDatabaseMigrationsAfterDatabaseRefreshed()
protected function afterRefreshingDatabase()
{
Schema::create('hashed_casts', function (Blueprint $table) {
$table->increments('id');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

class EloquentModelImmutableDateCastingTest extends DatabaseTestCase
{
protected function defineDatabaseMigrationsAfterDatabaseRefreshed()
protected function afterRefreshingDatabase()
{
Schema::create('test_model_immutable', function (Blueprint $table) {
$table->increments('id');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

class EloquentModelJsonCastingTest extends DatabaseTestCase
{
protected function defineDatabaseMigrationsAfterDatabaseRefreshed()
protected function afterRefreshingDatabase()
{
Schema::create('json_casts', function (Blueprint $table) {
$table->increments('id');
Expand Down
2 changes: 1 addition & 1 deletion tests/Integration/Database/EloquentModelLoadCountTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

class EloquentModelLoadCountTest extends DatabaseTestCase
{
protected function defineDatabaseMigrationsAfterDatabaseRefreshed()
protected function afterRefreshingDatabase()
{
Schema::create('base_models', function (Blueprint $table) {
$table->increments('id');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

class EloquentModelLoadMissingTest extends DatabaseTestCase
{
protected function defineDatabaseMigrationsAfterDatabaseRefreshed()
protected function afterRefreshingDatabase()
{
Schema::create('posts', function (Blueprint $table) {
$table->increments('id');
Expand Down
2 changes: 1 addition & 1 deletion tests/Integration/Database/EloquentModelRefreshTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

class EloquentModelRefreshTest extends DatabaseTestCase
{
protected function defineDatabaseMigrationsAfterDatabaseRefreshed()
protected function afterRefreshingDatabase()
{
Schema::create('posts', function (Blueprint $table) {
$table->increments('id');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

class EloquentModelStringCastingTest extends DatabaseTestCase
{
protected function defineDatabaseMigrationsAfterDatabaseRefreshed()
protected function afterRefreshingDatabase()
{
Schema::create('casting_table', function (Blueprint $table) {
$table->increments('id');
Expand Down
2 changes: 1 addition & 1 deletion tests/Integration/Database/EloquentModelTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

class EloquentModelTest extends DatabaseTestCase
{
protected function defineDatabaseMigrationsAfterDatabaseRefreshed()
protected function afterRefreshingDatabase()
{
Schema::create('test_model1', function (Blueprint $table) {
$table->increments('id');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

class EloquentModelWithoutEventsTest extends DatabaseTestCase
{
protected function defineDatabaseMigrationsAfterDatabaseRefreshed()
protected function afterRefreshingDatabase()
{
Schema::create('auto_filled_models', function (Blueprint $table) {
$table->increments('id');
Expand Down
2 changes: 1 addition & 1 deletion tests/Integration/Database/EloquentMorphConstrainTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

class EloquentMorphConstrainTest extends DatabaseTestCase
{
protected function defineDatabaseMigrationsAfterDatabaseRefreshed()
protected function afterRefreshingDatabase()
{
Schema::create('posts', function (Blueprint $table) {
$table->increments('id');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

class EloquentMorphCountEagerLoadingTest extends DatabaseTestCase
{
protected function defineDatabaseMigrationsAfterDatabaseRefreshed()
protected function afterRefreshingDatabase()
{
Schema::create('likes', function (Blueprint $table) {
$table->increments('id');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

class EloquentMorphCountLazyEagerLoadingTest extends DatabaseTestCase
{
protected function defineDatabaseMigrationsAfterDatabaseRefreshed()
protected function afterRefreshingDatabase()
{
Schema::create('likes', function (Blueprint $table) {
$table->increments('id');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

class EloquentMorphEagerLoadingTest extends DatabaseTestCase
{
protected function defineDatabaseMigrationsAfterDatabaseRefreshed()
protected function afterRefreshingDatabase()
{
Schema::create('users', function (Blueprint $table) {
$table->increments('id');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

class EloquentMorphLazyEagerLoadingTest extends DatabaseTestCase
{
protected function defineDatabaseMigrationsAfterDatabaseRefreshed()
protected function afterRefreshingDatabase()
{
Schema::create('users', function (Blueprint $table) {
$table->increments('id');
Expand Down
2 changes: 1 addition & 1 deletion tests/Integration/Database/EloquentMorphManyTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

class EloquentMorphManyTest extends DatabaseTestCase
{
protected function defineDatabaseMigrationsAfterDatabaseRefreshed()
protected function afterRefreshingDatabase()
{
Schema::create('posts', function (Blueprint $table) {
$table->increments('id');
Expand Down
2 changes: 1 addition & 1 deletion tests/Integration/Database/EloquentMorphOneIsTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

class EloquentMorphOneIsTest extends DatabaseTestCase
{
protected function defineDatabaseMigrationsAfterDatabaseRefreshed()
protected function afterRefreshingDatabase()
{
Schema::create('posts', function (Blueprint $table) {
$table->increments('id');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

class EloquentMorphToGlobalScopesTest extends DatabaseTestCase
{
protected function defineDatabaseMigrationsAfterDatabaseRefreshed()
protected function afterRefreshingDatabase()
{
Schema::create('posts', function (Blueprint $table) {
$table->increments('id');
Expand Down
2 changes: 1 addition & 1 deletion tests/Integration/Database/EloquentMorphToIsTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

class EloquentMorphToIsTest extends DatabaseTestCase
{
protected function defineDatabaseMigrationsAfterDatabaseRefreshed()
protected function afterRefreshingDatabase()
{
Schema::create('posts', function (Blueprint $table) {
$table->increments('id');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

class EloquentMorphToLazyEagerLoadingTest extends DatabaseTestCase
{
protected function defineDatabaseMigrationsAfterDatabaseRefreshed()
protected function afterRefreshingDatabase()
{
Schema::create('users', function (Blueprint $table) {
$table->increments('id');
Expand Down
2 changes: 1 addition & 1 deletion tests/Integration/Database/EloquentMorphToSelectTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

class EloquentMorphToSelectTest extends DatabaseTestCase
{
protected function defineDatabaseMigrationsAfterDatabaseRefreshed()
protected function afterRefreshingDatabase()
{
Schema::create('posts', function (Blueprint $table) {
$table->increments('id');
Expand Down
Loading

0 comments on commit 597c515

Please sign in to comment.