output = $output; return $this; } public function assertExecuted(array|string $commands): void { if (! $this->commands) { PHPUnit::fail('No commands are executed'); } if (! is_array($commands)) { $commands = [$commands]; } $allExecuted = true; foreach ($commands as $command) { if (! in_array($command, $commands)) { $allExecuted = false; } } if (! $allExecuted) { PHPUnit::fail('The expected commands are not executed'); } PHPUnit::assertTrue(true, $allExecuted); } public function exec(string|array|SSHCommand $commands, string $log = '', int $siteId = null): string { if (! is_array($commands)) { $commands = [$commands]; } foreach ($commands as $command) { if (is_string($command)) { $this->commands[] = $command; } else { $this->commands[] = get_class($command); } } return 'fake output'; } }