#!/usr/bin/env php
getTmpRoot() . 'jirafile/';
if(is_dir($tmpRoot)) {
$filePath = $tmpRoot . 'nodeassociation.xml';
if(file_exists($filePath)) @unlink($filePath);
@rmdir($tmpRoot);
}
// 测试步骤(必须至少5个,每个写在一行)
r($convertTest->getVersionGroupTest()) && p() && e('0'); // 步骤1:无文件时返回空数组
if(!is_dir($tmpRoot)) mkdir($tmpRoot, 0755, true); $xmlContent = ''; file_put_contents($tmpRoot . 'nodeassociation.xml', $xmlContent); r(count($convertTest->getVersionGroupTest())) && p() && e('1'); // 步骤2:有效XML文件返回版本组
file_put_contents($tmpRoot . 'nodeassociation.xml', ''); r(count($convertTest->getVersionGroupTest())) && p() && e('0'); // 步骤3:空XML文件返回空数组
$xmlContent2 = ''; file_put_contents($tmpRoot . 'nodeassociation.xml', $xmlContent2); r(count($convertTest->getVersionGroupTest())) && p() && e('2'); // 步骤4:多个版本组的XML文件
$xmlContent3 = ''; file_put_contents($tmpRoot . 'nodeassociation.xml', $xmlContent3); r(count($convertTest->getVersionGroupTest())) && p() && e('3'); // 步骤5:不同版本ID的情况