我在ubunto-12.04上的vagrant中有cakePHP-2.0,使用composer安装了phpunit-3.7。*。但是当我尝试运行测试时,它会显示以下错误:
致命错误:require_once():无法打开所需的'src / TextUI / Command.php'(include_path ='/ home / vagrant / test-phpunit / cakePHP-2.0 / app / Vendor / phpunit / php-text-template :/home/vagrant/test-phpunit/cakePHP-2.0/app/Vendor/phpunit/phpunit-mock-objects:/home/vagrant/test-phpunit/cakePHP-2.0/app/Vendor/phpunit/php-timer:/家/流浪/测试的PHPUnit / CakePHP的-2.0 /应用/供应商/ PHPUnit的/ PHP-令牌流:/home/vagrant/test-phpunit/cakePHP-2.0/app/Vendor/phpunit/php-file-iterator:/家/流浪/测试的PHPUnit / CakePHP的-2.0 /应用/供应商/ PHPUnit的/ PHP-代码覆盖:/home/vagrant/test-phpunit/cakePHP-2.0/app/Vendor/phpunit/phpunit:/家庭/流浪汉/ test-phpunit / cakePHP-2.0 / app / Vendor / symfony / yaml:/home/vagrant/test-phpunit/cakePHP-2.0/lib:。:/ usr / share / php:/ usr / share / pear')/第21行的home / vagrant / test-phpunit / cakePHP-2.0 / app / TestSuite / CakeTestSuiteCommand.php
答案 0 :(得分:1)
尝试将以下行追加到APP / Config / bootstrap.php。 它适用于我(使用Composer的CakePHP 2.6.1。)
define('__PHPUNIT_PHAR__', '');