Yii功能测试错误

So, I'm learning the book "Agile web-dev with Yii", and example of functional testing from that book produces the error below:

Warning: require_once(Symfony/Component/Yaml/autoloader.php): failed to open stream: No such file or directory in D:\web\server\php\pear\PHPUnit\Autoload.php on line 69

Call Stack: 0.0004 326184 1. {main}() D:\web\server\php\phpunit:0 0.0011 367616 2. require('D:\web\server\php\pear\PHPUnit\Autoload.php') D:\web\server\php\phpunit:43

Fatal error: require_once(): Failed opening required 'Symfony/Component/Yaml/autoloader.php' (include_path='.;D:\web\server\php\pear') in D:\web\server\php\pear\PHPUnit\Autoload.php on line 69

Call Stack: 0.0004 326184 1. {main}() D:\web\server\php\phpunit:0 0.0011 367616 2. require('D:\web\server\php\pear\PHPUnit\Autoload.php') D:\web\server\php\phpunit:43

I've spent a lot of time to fix this error, and I have no idea what to do.

I had the same problem while upgrading my phpunit.

This solved the problem:

pear channel-discover pear.symfony.com

pear install pear.symfony.com/Yaml

Then run:

pear install --alldeps pear.phpunit.de/PHPUnit

Hope this will solve your problem.