#!/usr/bin/env php config->sso)) { unset($tester->config->sso->turnon); unset($tester->config->sso->key); } // 5. 强制要求:必须包含至少5个测试步骤 r($ssoTest->checkKeyTest()) && p() && e('0'); // 步骤1:SSO功能未开启 $tester->config->sso->turnon = true; r($ssoTest->checkKeyTest()) && p() && e('0'); // 步骤2:密钥为空 $tester->config->sso->key = 'test_secret_key'; $_GET['hash'] = 'wrong_hash'; r($ssoTest->checkKeyTest()) && p() && e('0'); // 步骤3:密钥不匹配 $_GET['hash'] = ''; r($ssoTest->checkKeyTest()) && p() && e('0'); // 步骤4:hash参数为空 $_GET['hash'] = 'test_secret_key'; r($ssoTest->checkKeyTest()) && p() && e('1'); // 步骤5:密钥完全匹配