#!/usr/bin/env php getTmpRoot() . 'jirafile/'; if(is_dir($tmpRoot)) { $filePath = $tmpRoot . 'nodeassociation.xml'; if(file_exists($filePath)) @unlink($filePath); @rmdir($tmpRoot); } r($convertTest->getVersionGroupTest()) && p() && e('0'); // 步骤2:存在有效nodeassociation.xml文件时返回版本分组数据 if(!is_dir($tmpRoot)) mkdir($tmpRoot, 0755, true); $xmlContent = ' '; file_put_contents($tmpRoot . 'nodeassociation.xml', $xmlContent); $result = $convertTest->getVersionGroupTest(); r(count($result)) && p() && e('1'); // 步骤3:nodeassociation.xml文件内容为空时返回空数组 file_put_contents($tmpRoot . 'nodeassociation.xml', ''); r($convertTest->getVersionGroupTest()) && p() && e('0'); // 步骤4:包含多个版本组的XML文件 $xmlContent3 = ' '; file_put_contents($tmpRoot . 'nodeassociation.xml', $xmlContent3); $result2 = $convertTest->getVersionGroupTest(); r(count($result2)) && p() && e('2'); // 步骤5:测试不同版本ID的情况 $xmlContent4 = ' '; file_put_contents($tmpRoot . 'nodeassociation.xml', $xmlContent4); $result3 = $convertTest->getVersionGroupTest(); r(count($result3)) && p() && e('3');