Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions ProcessMaker/Jobs/RefreshArtisanCaches.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,13 @@ public function middleware(): array
*/
public function handle()
{
// Skip in testing environment because this reconnects the database
// meaning we loose transactions, and sets the console output verbosity
// to quiet so we loose expectsOutput assertions.
if (app()->environment('testing')) {
return;
}

$options = [
'--no-interaction' => true,
'--quiet' => true,
Expand Down
12 changes: 0 additions & 12 deletions tests/TestCase.php
Original file line number Diff line number Diff line change
Expand Up @@ -134,18 +134,6 @@ public function setUpMockScriptRunners(): void
config()->set('script-runners.php-nayra.runner', 'MockRunner');
}

/**
* Calling the real config:cache command reconnects the database
* and since we're using transactions for our tests, we lose any data
* saved before the command is run. Instead, mock it out here.
*/
public function setUpMockConfigCache(): void
{
Bus::fake([
RefreshArtisanCaches::class,
]);
}

/**
* Run additional tearDowns from traits.
*/
Expand Down