附录 A XML配置文件
时间:2008-04-08 来源:hshq_cn
附录 A XML配置文件
...
测试套件
...
/path/to/*Test.php files
/path/to/MyTest.php
分组
...
name
name
上面的XML配置对应带下面的参数调用TextUI测试启动器:
--group name
...
/path/to/files
/path/to/file
/path/to/files
/path/to/file
/path/to/files
/path/to/file
/path/to/files
/path/to/file
上面的XML配置对应如下使用类PHPUnit_Util_Filter:
PHPUnit_Util_Filter::addDirectoryToFilter(
/path/to/files', '.php'
);
PHPUnit_Util_Filter::addFileToFilter('/path/to/file');
PHPUnit_Util_Filter::removeDirectoryFromFilter(
/path/to/files', '.php'
);
PHPUnit_Util_Filter::removeFileFromFilter('/path/to/file');
PHPUnit_Util_Filter::addDirectoryToWhitelist(
/path/to/files', '.php'
);
PHPUnit_Util_Filter::addFileToWhitelist('/path/to/file');
PHPUnit_Util_Filter::removeDirectoryFromWhitelist(
/path/to/files', '.php'
);
PHPUnit_Util_Filter::removeFileFromWhitelist('/path/to/file');日志
...
上面的XML配置对应带下面的参数调用TextUI测试启动器:
...
上面的对应内建的PMD规则的默认设置。
设置PHP INI和全局变量
...
上面的XML配置对应下面的PHP代码:
ini_set('foo', 'bar');
$GLOBALS['foo'] = 'bar';
...
测试套件
...
/path/to/*Test.php files
/path/to/MyTest.php
分组
...
name
name
上面的XML配置对应带下面的参数调用TextUI测试启动器:
--group name
-
--exclude-group name
...
/path/to/files
/path/to/file
/path/to/files
/path/to/file
/path/to/files
/path/to/file
/path/to/files
/path/to/file
上面的XML配置对应如下使用类PHPUnit_Util_Filter:
PHPUnit_Util_Filter::addDirectoryToFilter(
/path/to/files', '.php'
);
PHPUnit_Util_Filter::addFileToFilter('/path/to/file');
PHPUnit_Util_Filter::removeDirectoryFromFilter(
/path/to/files', '.php'
);
PHPUnit_Util_Filter::removeFileFromFilter('/path/to/file');
PHPUnit_Util_Filter::addDirectoryToWhitelist(
/path/to/files', '.php'
);
PHPUnit_Util_Filter::addFileToWhitelist('/path/to/file');
PHPUnit_Util_Filter::removeDirectoryFromWhitelist(
/path/to/files', '.php'
);
PHPUnit_Util_Filter::removeFileFromWhitelist('/path/to/file');日志
...
上面的XML配置对应带下面的参数调用TextUI测试启动器:
-
--coverage-html /tmp/report
-
--coverage-xml /tmp/coverage.xml
-
--log-graphviz /tmp/logfile.dot
-
--log-json /tmp/logfile.json
-
--log-metrics /tmp/metrics.xml
-
> /tmp/logfile.txt
-
--log-pmd /tmp/pmd.xml
-
--log-tap /tmp/logfile.tap
-
--log-xml /tmp/logfile.xml
-
--testdox-html /tmp/testdox.html
-
--testdox-text /tmp/testdox.txt
...
上面的对应内建的PMD规则的默认设置。
设置PHP INI和全局变量
...
上面的XML配置对应下面的PHP代码:
ini_set('foo', 'bar');
$GLOBALS['foo'] = 'bar';
相关阅读 更多 +
排行榜 更多 +