Skip to content

Commit

Permalink
testbench bootstrap test
Browse files Browse the repository at this point in the history
  • Loading branch information
LaravelFreelancerNL committed Nov 27, 2023
1 parent d19858e commit 8b2de84
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 28 deletions.
28 changes: 10 additions & 18 deletions tests/BootstrapTestbench.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,6 @@
namespace Tests;

use Illuminate\Contracts\Foundation\Application;
use Spatie\Ray\Settings\Settings;

use function Orchestra\Testbench\after_resolving;

/**
* @internal
Expand All @@ -24,21 +21,16 @@ class BootstrapTestbench
*/
public function bootstrap(Application $app): void
{
after_resolving($app, Settings::class, static function ($settings, $app) {
dump('BootstrapTestbench is used!');
die;

$config = $app->make('config');
$config = $app->make('config');

$config->set('database.connections.arangodb', [
'name' => 'arangodb',
'driver' => 'arangodb',
'endpoint' => env('DB_ENDPOINT', 'http://localhost:8529'),
'username' => env('DB_USERNAME', 'root'),
'password' => env('DB_PASSWORD', null),
'database' => env('DB_DATABASE', 'aranguent__test'),
]);
$config->set('database.default', 'arangodb');
});
$config->set('database.connections.arangodb', [
'name' => 'arangodb',
'driver' => 'arangodb',
'endpoint' => env('DB_ENDPOINT', 'http://localhost:8529'),
'username' => env('DB_USERNAME', 'root'),
'password' => env('DB_PASSWORD', null),
'database' => env('DB_DATABASE', 'aranguent__test'),
]);
$config->set('database.default', 'arangodb');
}
}
20 changes: 10 additions & 10 deletions tests/TestCase.php
Original file line number Diff line number Diff line change
Expand Up @@ -101,16 +101,16 @@ protected function setUp(): void
]);
}

/**
* Define environment setup.
*
* @param \Illuminate\Foundation\Application $app
* @return void
*/
protected function defineEnvironment($app)
{
TestConfig::set($app);
}
// /**
// * Define environment setup.
// *
// * @param \Illuminate\Foundation\Application $app
// * @return void
// */
// protected function defineEnvironment($app)
// {
// TestConfig::set($app);
// }


protected function skipTestOnArangoVersionsBefore(string $version)
Expand Down

0 comments on commit 8b2de84

Please sign in to comment.