assert(file_exists($softwareFile), "软件开发独立页文件必须存在"); $this->assert(file_exists($appFile), "APP与小程序定制独立页文件必须存在"); $this->assert(file_exists($agentFile), "智能体开发独立页文件必须存在"); if (file_exists($softwareFile)) { $softwareContent = file_get_contents($softwareFile); $this->assert(strpos($softwareContent, '纳海川') !== false, "软件开发独立页包含品牌【纳海川】"); $this->assert(strpos($softwareContent, '微服务') !== false && strpos($softwareContent, '中台') !== false, "软件开发独立页包含微服务与中台"); } if (file_exists($appFile)) { $appContent = file_get_contents($appFile); $this->assert(strpos($appContent, '纳海川') !== false, "APP小程序独立页包含品牌【纳海川】"); $this->assert(strpos($appContent, '60fps') !== false || strpos($appContent, '蓝牙') !== false, "APP小程序独立页包含真实移动工程指标"); } if (file_exists($agentFile)) { $agentContent = file_get_contents($agentFile); $this->assert(strpos($agentContent, '纳海川') !== false, "智能体独立页包含品牌【纳海川】"); $this->assert(strpos($agentContent, 'RAG') !== false || strpos($agentContent, '物理隔离') !== false, "智能体独立页包含RAG与物理隔离保障"); } if (file_exists($navFile)) { $navContent = file_get_contents($navFile); $this->assert(strpos($navContent, 'service_software') !== false || strpos($navContent, 'service=software') !== false, "导航卡片支持跳转软件开发独立页"); $this->assert(strpos($navContent, 'service_app') !== false || strpos($navContent, 'service=app') !== false, "导航卡片支持跳转APP小程序独立页"); $this->assert(strpos($navContent, 'service_agent') !== false || strpos($navContent, 'service=agent') !== false, "导航卡片支持跳转智能体独立页"); } echo "\n测试结果: {$this->passed} 通过, {$this->failed} 失败\n"; return $this->failed === 0; } private function assert($condition, $message) { if ($condition) { echo " [PASS] {$message}\n"; $this->passed++; } else { echo " [FAIL] {$message}\n"; $this->failed++; } } }