Skip to content

Commit 8f0a82e

Browse files
authored
Test Improvements (#54427)
* Test Improvements Using the `WithConfig` attribute to load configuration during the Laravel bootstrapping step for a specific test (between `RegisterProviders` and `BootProviders`) instead of loading the configuration when the application is booted. * Update CloudTest.php
1 parent 6cdef2c commit 8f0a82e

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

tests/Integration/Foundation/CloudTest.php

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,18 +3,14 @@
33
namespace Illuminate\Tests\Integration\Foundation;
44

55
use Illuminate\Foundation\Cloud;
6+
use Orchestra\Testbench\Attributes\WithConfig;
67
use Orchestra\Testbench\TestCase;
78

89
class CloudTest extends TestCase
910
{
11+
#[WithConfig('database.connections.pgsql', ['host' => 'test-pooler.pg.laravel.cloud', 'username' => 'test-username', 'password' => 'test-password'])]
1012
public function test_it_can_resolve_core_container_aliases()
1113
{
12-
$this->app['config']->set('database.connections.pgsql', [
13-
'host' => 'test-pooler.pg.laravel.cloud',
14-
'username' => 'test-username',
15-
'password' => 'test-password',
16-
]);
17-
1814
Cloud::configureUnpooledPostgresConnection($this->app);
1915

2016
$this->assertEquals([

0 commit comments

Comments
 (0)