From bdebd65f5cb3e5e5ba052ab40650d6f25d45086c Mon Sep 17 00:00:00 2001 From: Jess Archer Date: Mon, 18 Sep 2023 17:13:18 +1000 Subject: [PATCH] Force interactive mode when mocking --- src/Concerns/FakesInputOutput.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/Concerns/FakesInputOutput.php b/src/Concerns/FakesInputOutput.php index 7fc01a49..2df265f1 100644 --- a/src/Concerns/FakesInputOutput.php +++ b/src/Concerns/FakesInputOutput.php @@ -16,6 +16,9 @@ trait FakesInputOutput */ public static function fake(array $keys = []): void { + // Force interactive mode when testing because we will be mocking the terminal. + static::interactive(); + $mock = \Mockery::mock(Terminal::class); $mock->shouldReceive('write')->byDefault();