使用 Symfony 2.0,我的整个系统在 localhost 中正常工作。
现在,我尝试将其上传到 Internet 托管。在遇到一些错误后,我被困在这里:
Fatal error: Class 'PHPUnit_Framework_TestCase' not found in /home/preparatest/www/Symfony/vendor/symfony/src/Symfony/Bundle/FrameworkBundle/Test/WebTestCase.php
(顺便说一句,该类确实存在于该目录中)。
有人通过这个吗?
注意:我不是特别配置PHPUnit。我猜它只是包含在一些 Symfony 包中。我真的不知道它是做什么用的,如果可能的话,我不介意完全删除它。
更新:这是不工作的确切类。显然它没有找到父类\PHPUnit_Framework_TestCase
。但是,我坚持认为,这是一个捆绑在 Symfony 中的包,并且在本地运行良好。我不明白为什么它不在远程:(
<?php
/*
* This file is part of the Symfony package.
*
* (c) Fabien Potencier <fabien@symfony.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Symfony\Bundle\FrameworkBundle\Test;
use Symfony\Bundle\FrameworkBundle\Client;
use Symfony\Component\Finder\Finder;
use Symfony\Component\HttpKernel\HttpKernelInterface;
/**
* WebTestCase is the base class for functional tests.
*
* @author Fabien Potencier <fabien@symfony.com>
*/
abstract class WebTestCase extends \PHPUnit_Framework_TestCase
{
static protected $class;
static protected $kernel;