Open abdulwahhabkhan opened 1 year ago
Same issue here - seems like the settings in phpunit.xml is ignored
Same issue here, I cannot get pest to use the .env.testing
with this installed.
I was able to get this working by adding a line in the CreatesApplication.php trait to force loading .env.testing
:
<?php
namespace Tests;
use Illuminate\Contracts\Console\Kernel;
use Illuminate\Foundation\Application;
trait CreatesApplication
{
/**
* Creates the application.
*/
public function createApplication(): Application
{
$app = require __DIR__.'/../bootstrap/app.php';
$app->loadEnvironmentFrom('.env.testing');
$app->make(Kernel::class)->bootstrap();
return $app;
}
}
Hi Luke,
I really like your videos on youtube and was impressed with the talk on Laracone EU so started playing around with Higher Order Tests.
To resolve the route helper I installed the plugin and it works :)
But rain into a problem as now the test communicates with the local DB instead of the test DB.
Please can you let me know is this expected behaviour or if I missed some information?