Skip to content

Commit e5bb977

Browse files
authored
Merge pull request #8548 from ProcessMaker/fix-tests
Fix failing tests
2 parents 4c5eb45 + ae53316 commit e5bb977

2 files changed

Lines changed: 7 additions & 12 deletions

File tree

ProcessMaker/Jobs/RefreshArtisanCaches.php

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,13 @@ public function middleware(): array
4242
*/
4343
public function handle()
4444
{
45+
// Skip in testing environment because this reconnects the database
46+
// meaning we loose transactions, and sets the console output verbosity
47+
// to quiet so we loose expectsOutput assertions.
48+
if (app()->environment('testing')) {
49+
return;
50+
}
51+
4552
$options = [
4653
'--no-interaction' => true,
4754
'--quiet' => true,

tests/TestCase.php

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -134,18 +134,6 @@ public function setUpMockScriptRunners(): void
134134
config()->set('script-runners.php-nayra.runner', 'MockRunner');
135135
}
136136

137-
/**
138-
* Calling the real config:cache command reconnects the database
139-
* and since we're using transactions for our tests, we lose any data
140-
* saved before the command is run. Instead, mock it out here.
141-
*/
142-
public function setUpMockConfigCache(): void
143-
{
144-
Bus::fake([
145-
RefreshArtisanCaches::class,
146-
]);
147-
}
148-
149137
/**
150138
* Run additional tearDowns from traits.
151139
*/

0 commit comments

Comments
 (0)