assertNotFalse($start); $process = new Process(['bash', '-c', 'set -eu; compose_file=fixture; credential_file=fixture; docker() { return ' . $verificationExit . '; }; ' . substr($script, $start), ]); $process->setTimeout(5); $process->run(); $this->assertSame($expectedExit, $process->getExitCode()); $this->assertStringContainsString($message, $process->getOutput() . $process->getErrorOutput()); if ($verificationExit !== 0) { $this->assertStringNotContainsString('团队共享系统数据库验证通过', $process->getOutput()); } } public static function verificationStates(): array { return [ 'bootstrap' => [13, 0, '团队数据接入尚未完成'], 'shared success' => [0, 0, '团队共享系统数据库验证通过'], 'config failure' => [10, 10, '未通过验证'], 'network failure' => [11, 11, '未通过验证'], 'schema failure' => [12, 12, '未通过验证'], ]; } }