Is it possible to run migration and seeding once and don't refresh the testing db between the test methods?
I have couple of testing functions that depend on each other and I don't want to migrate and seed the database before and after each test in one testing file.
Example:
<?php
namespace Tests\Browser;
use Tests\DuskTestCase;
use Laravel\Dusk\Browser;
use Illuminate\Foundation\Testing\DatabaseMigrations;
use Carbon\Carbon;
class AdminTest extends DuskTestCase
{
use DatabaseMigrations;
/**
* Define hooks to migrate the database before and after each test.
*
* @return void
*/
protected function setUp(): void
{
parent::setUp();
$this->artisan('db:seed', ['--class' => 'DatabaseSeeder']);
}
public function testAdminCanLogin()
{
}
/* Create New ticket */
public function testAdminCreateTicket()
{
}
/* View the first ticket */
public function testAdminViewTicket()
{
}
/* Edit the first ticket */
public function testAdminEditTicket()
{
}
/* Assign the first Ticket to an Agent */
public function testAdminAssignTicketToAgent()
{
}
/* Unassign the first Ticket from Agent */
public function testAdminUnassignAgentFromTicket()
{
}
/* Delete the first ticket */
public function testAdminDeleteTicket()
{
}
/* Restore the first ticket */
public function testAdminRestoreTicket()
{
}
}