我有一个“Zentd Framework”项目,希望利用单位测试测试。
在测试夹中,我有<编码>phpunit.xml:
<phpunit bootstrap="./application/bootstrap.php" colors="true">
<testsuite name="Application Test Suite">
<directory>./</directory>
</testsuite>
<filter>
<whitelist>
<directory suffix=".php">../application/</directory>
<exclude>
<directory suffix=".phtml">../application/</directory>
<file>../application/Bootstrap.php</file>
<file>../application/controllers/ErrorController.php</file>
</exclude>
</whitelist>
</filter>
<logging>
<log type="coverage-html" target="./log/reprot" charset="UTP-8"
yui="true" highlight = "true" lowUpoerBound="50" highLowerBound="80"/>
<log type="textdox" target="./log/testdox.html" />
</logging>
我有<条码>boot锁.php条码>,载于/测试/应用文件夹如下:
<?php
error_reporting(E_ALL | E_STRICT);
// Define path to application directory
defined( APPLICATION_PATH )
|| define( APPLICATION_PATH , realpath(dirname(__FILE__) . /../../application ));
// Define application environment
defined( APPLICATION_ENV )
|| define( APPLICATION_ENV , (getenv( APPLICATION_ENV ) ? getenv( APPLICATION_ENV ) : testing ));
// Ensure library/ is on include_path
set_include_path(implode(PATH_SEPARATOR, array(
realpath(APPLICATION_PATH . /../library ),
get_include_path(),
)));
require_once Zend/Loader/Autoloader.php ;
require_once controllers/ControllerTestCase.php ;
Zend_Loader_Autoloader::getInstance();
当我去指挥线时,指挥线如下:
phpunit --configuration phpunit.xml
it throws the exception:
PHP Fatal error: Uncaught exception PHPUnit_Framework_Exception with message Neither "Application Test Suite.php" nor "Application Test Suite.php" could be opened. in D:PHPphp5PEARPHPUnitUtilSkeletonTest.php:102 Stack trace: #0 D:PHPphp5PEARPHPUnitTextUICommand.php(157): PHPUnit_Util_Skeleton_Test- >__construct( Application Tes... , ) #1 D:PHPphp5PEARPHPUnitTextUICommand.php(129): PHPUnit_TextUI_Command->run (Array, true) #2 D:PHPphp5phpunit(53): PHPUnit_TextUI_Command::main() #3 {main} thrown in D:PHPphp5PEARPHPUnitUtilSkeletonTest.php on line 102
我怎么能够确定这一点?