diff --git a/composer.json b/composer.json index cf2c2589ce8f..282d9ff0aa8d 100644 --- a/composer.json +++ b/composer.json @@ -111,7 +111,7 @@ "league/flysystem-read-only": "^3.25.1", "league/flysystem-sftp-v3": "^3.25.1", "mockery/mockery": "^1.6.10", - "orchestra/testbench-core": "^9.9.4", + "orchestra/testbench-core": "^9.11.2", "pda/pheanstalk": "^5.0.6", "php-http/discovery": "^1.15", "phpstan/phpstan": "^2.0", diff --git a/tests/Integration/Cache/DynamoDbStoreTest.php b/tests/Integration/Cache/DynamoDbStoreTest.php index b465cc61ea0e..7abe70d27864 100644 --- a/tests/Integration/Cache/DynamoDbStoreTest.php +++ b/tests/Integration/Cache/DynamoDbStoreTest.php @@ -65,7 +65,7 @@ public function testLocksCanBeAcquired() * @param \Illuminate\Foundation\Application $app * @return void */ - protected function getEnvironmentSetUp($app) + protected function defineEnvironment($app) { if (! env('DYNAMODB_CACHE_TABLE')) { $this->markTestSkipped('DynamoDB not configured.'); diff --git a/tests/Integration/Cookie/CookieTest.php b/tests/Integration/Cookie/CookieTest.php index bc5252630376..ed5223022a91 100644 --- a/tests/Integration/Cookie/CookieTest.php +++ b/tests/Integration/Cookie/CookieTest.php @@ -42,7 +42,7 @@ public function test_cookie_is_sent_back_with_proper_expire_time_with_respect_to $this->assertEquals(Carbon::now()->getTimestamp() + 60, $response->headers->getCookies()[1]->getExpiresTime()); } - protected function getEnvironmentSetUp($app) + protected function defineEnvironment($app) { $app->instance( ExceptionHandler::class, diff --git a/tests/Integration/Database/EloquentTransactionWithAfterCommitUsingDatabaseTransactionsTest.php b/tests/Integration/Database/EloquentTransactionWithAfterCommitUsingDatabaseTransactionsTest.php index 25a8b27a72cc..620df3d0b9c7 100644 --- a/tests/Integration/Database/EloquentTransactionWithAfterCommitUsingDatabaseTransactionsTest.php +++ b/tests/Integration/Database/EloquentTransactionWithAfterCommitUsingDatabaseTransactionsTest.php @@ -32,7 +32,7 @@ protected function setUp(): void } } - protected function getEnvironmentSetUp($app) + protected function defineEnvironment($app) { $connection = $app->make('config')->get('database.default'); diff --git a/tests/Integration/Database/MariaDb/DatabaseEmulatePreparesMariaDbConnectionTest.php b/tests/Integration/Database/MariaDb/DatabaseEmulatePreparesMariaDbConnectionTest.php index 8c155518dcb5..451fd3a1bd69 100755 --- a/tests/Integration/Database/MariaDb/DatabaseEmulatePreparesMariaDbConnectionTest.php +++ b/tests/Integration/Database/MariaDb/DatabaseEmulatePreparesMariaDbConnectionTest.php @@ -10,9 +10,9 @@ #[RequiresPhpExtension('pdo_mysql')] class DatabaseEmulatePreparesMariaDbConnectionTest extends DatabaseMariaDbConnectionTest { - protected function getEnvironmentSetUp($app) + protected function defineEnvironment($app) { - parent::getEnvironmentSetUp($app); + parent::defineEnvironment($app); $app['config']->set('database.connections.mariadb.options', [ PDO::ATTR_EMULATE_PREPARES => true, diff --git a/tests/Integration/Database/MySql/DatabaseEmulatePreparesMySqlConnectionTest.php b/tests/Integration/Database/MySql/DatabaseEmulatePreparesMySqlConnectionTest.php index 62592a40486f..a67d747945e7 100755 --- a/tests/Integration/Database/MySql/DatabaseEmulatePreparesMySqlConnectionTest.php +++ b/tests/Integration/Database/MySql/DatabaseEmulatePreparesMySqlConnectionTest.php @@ -10,9 +10,9 @@ #[RequiresPhpExtension('pdo_mysql')] class DatabaseEmulatePreparesMySqlConnectionTest extends DatabaseMySqlConnectionTest { - protected function getEnvironmentSetUp($app) + protected function defineEnvironment($app) { - parent::getEnvironmentSetUp($app); + parent::defineEnvironment($app); $app['config']->set('database.connections.mysql.options', [ PDO::ATTR_EMULATE_PREPARES => true, diff --git a/tests/Integration/Database/Postgres/PostgresSchemaBuilderTest.php b/tests/Integration/Database/Postgres/PostgresSchemaBuilderTest.php index 4f64c21fbc80..bfcf439d74ac 100644 --- a/tests/Integration/Database/Postgres/PostgresSchemaBuilderTest.php +++ b/tests/Integration/Database/Postgres/PostgresSchemaBuilderTest.php @@ -13,9 +13,9 @@ #[RequiresPhpExtension('pdo_pgsql')] class PostgresSchemaBuilderTest extends PostgresTestCase { - protected function getEnvironmentSetUp($app) + protected function defineEnvironment($app) { - parent::getEnvironmentSetUp($app); + parent::defineEnvironment($app); $app['config']->set('database.connections.pgsql.search_path', 'public,private'); } diff --git a/tests/Integration/Mail/SendingMarkdownMailTest.php b/tests/Integration/Mail/SendingMarkdownMailTest.php index 591b7264f60a..43ecd156646d 100644 --- a/tests/Integration/Mail/SendingMarkdownMailTest.php +++ b/tests/Integration/Mail/SendingMarkdownMailTest.php @@ -12,7 +12,7 @@ class SendingMarkdownMailTest extends TestCase { - protected function getEnvironmentSetUp($app) + protected function defineEnvironment($app) { $app['config']->set('mail.driver', 'array'); diff --git a/tests/Integration/Mail/SendingQueuedMailTest.php b/tests/Integration/Mail/SendingQueuedMailTest.php index 6f982043ce65..e20a44659cbb 100644 --- a/tests/Integration/Mail/SendingQueuedMailTest.php +++ b/tests/Integration/Mail/SendingQueuedMailTest.php @@ -11,7 +11,7 @@ class SendingQueuedMailTest extends TestCase { - protected function getEnvironmentSetUp($app) + protected function defineEnvironment($app) { $app['config']->set('mail.driver', 'array'); diff --git a/tests/Integration/Queue/JobEncryptionTest.php b/tests/Integration/Queue/JobEncryptionTest.php index 704c08001074..85701d51871f 100644 --- a/tests/Integration/Queue/JobEncryptionTest.php +++ b/tests/Integration/Queue/JobEncryptionTest.php @@ -21,9 +21,9 @@ class JobEncryptionTest extends DatabaseTestCase { use DatabaseMigrations; - protected function getEnvironmentSetUp($app) + protected function defineEnvironment($app) { - parent::getEnvironmentSetUp($app); + parent::defineEnvironment($app); $app['config']->set('app.key', Str::random(32)); $app['config']->set('queue.default', 'database'); diff --git a/tests/Integration/Queue/ModelSerializationTest.php b/tests/Integration/Queue/ModelSerializationTest.php index 359bbff8fa84..bd3b401c6576 100644 --- a/tests/Integration/Queue/ModelSerializationTest.php +++ b/tests/Integration/Queue/ModelSerializationTest.php @@ -18,7 +18,7 @@ class ModelSerializationTest extends TestCase { use RefreshDatabase; - protected function getEnvironmentSetUp($app) + protected function defineEnvironment($app) { $app['config']->set('database.connections.custom', [ 'driver' => 'sqlite', diff --git a/tests/Integration/Queue/QueueConnectionTest.php b/tests/Integration/Queue/QueueConnectionTest.php index 1ae5f1ef9083..7ad7722499a4 100644 --- a/tests/Integration/Queue/QueueConnectionTest.php +++ b/tests/Integration/Queue/QueueConnectionTest.php @@ -8,17 +8,14 @@ use Illuminate\Foundation\Bus\Dispatchable; use Illuminate\Support\Facades\Bus; use Mockery as m; +use Orchestra\Testbench\Attributes\WithConfig; use Orchestra\Testbench\TestCase; use Throwable; +#[WithConfig('queue.default', 'sqs')] +#[WithConfig('queue.connections.sqs.after_commit', true)] class QueueConnectionTest extends TestCase { - protected function getEnvironmentSetUp($app) - { - $app['config']->set('queue.default', 'sqs'); - $app['config']->set('queue.connections.sqs.after_commit', true); - } - protected function tearDown(): void { QueueConnectionTestJob::$ran = false; diff --git a/tests/Integration/View/BladeAnonymousComponentTest.php b/tests/Integration/View/BladeAnonymousComponentTest.php index eb29765dae03..0281de48d80f 100644 --- a/tests/Integration/View/BladeAnonymousComponentTest.php +++ b/tests/Integration/View/BladeAnonymousComponentTest.php @@ -41,7 +41,7 @@ public function test_anonymous_components_with_custom_paths_cant_be_rendered_as_ $view = View::make('panel')->render(); } - protected function getEnvironmentSetUp($app) + protected function defineEnvironment($app) { $app['config']->set('view.paths', [__DIR__.'/anonymous-components-templates']); } diff --git a/tests/Integration/View/BladeTest.php b/tests/Integration/View/BladeTest.php index 7a08d43fd0b3..6495175337c4 100644 --- a/tests/Integration/View/BladeTest.php +++ b/tests/Integration/View/BladeTest.php @@ -210,7 +210,7 @@ public function testViewCacheCommandHandlesConfiguredBladeExtensions() $this->artisan('view:clear'); } - protected function getEnvironmentSetUp($app) + protected function defineEnvironment($app) { $app['config']->set('view.paths', [__DIR__.'/templates']); } diff --git a/tests/Integration/View/RenderableViewExceptionTest.php b/tests/Integration/View/RenderableViewExceptionTest.php index 93c91cb31387..f5ed176e26f4 100644 --- a/tests/Integration/View/RenderableViewExceptionTest.php +++ b/tests/Integration/View/RenderableViewExceptionTest.php @@ -21,7 +21,7 @@ public function testRenderMethodOfExceptionThrownInViewGetsHandled() $response->assertSee('This is a renderable exception.'); } - protected function getEnvironmentSetUp($app) + protected function defineEnvironment($app) { $app['config']->set('view.paths', [__DIR__.'/templates']); }