mirror of
https://github.com/barryvdh/laravel-ide-helper.git
synced 2026-08-18 01:57:13 +00:00
tests: ensure output mocking is disabled so we can actually catch the output (#1018)
Discovered via https://github.com/barryvdh/laravel-ide-helper/pull/1017#issuecomment-679318764 This only happens if you run an artisan command _before_ `runCommand`, but since every of these tests performs migrations, using artisan, the mocked output instance is left behind and also affected us. The call added in `runCommand` explicitly unregisters `\Illuminate\Console\OutputStyle` and thus also throwing away possibly mocked versions.
This commit is contained in:
@@ -47,7 +47,7 @@ final class Test extends AbstractModelsCommand
|
||||
]);
|
||||
|
||||
$this->assertSame(0, $tester->getStatusCode());
|
||||
$this->assertEmpty($tester->getDisplay());
|
||||
$this->assertStringContainsString('Model information was written to _ide_helper_models.php', $tester->getDisplay());
|
||||
$this->assertMatchesPhpSnapshot($actualContent);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user