Reputation: 4324
Using Symfony 2.0, I have a whole system working properly in localhost.
Now I've tried to to upload it to an Internet hosting. After working in some errors, I am stuck here:
Fatal error: Class 'PHPUnit_Framework_TestCase' not found in /home/preparatest/www/Symfony/vendor/symfony/src/Symfony/Bundle/FrameworkBundle/Test/WebTestCase.php
(By the way, the class exists in that directory indeed).
Anybody passed through this?
NOTE: I am not particularly configuring PHPUnit. I guess it is just included within some Symfony bundle. I don't really know what it is for and I wouldn't mind, if possilbe, just to remove it completely.
UPDATE: This is the exact class that isn't working. Apparently it doesn't find the parent class \PHPUnit_Framework_TestCase
. But, I insist, this is a package bundled within Symfony and works well in local. I don't see why it doesn't in remote :(
<?php
/*
* This file is part of the Symfony package.
*
* (c) Fabien Potencier <[email protected]>
*
* 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 <[email protected]>
*/
abstract class WebTestCase extends \PHPUnit_Framework_TestCase
{
static protected $class;
static protected $kernel;
Upvotes: 3
Views: 8809
Reputation: 4324
Ok, solved.
I removed all Test and Tests folders from my Bundles. Those where just intended to perform unit tests with Symfony... but i productions apparently PHPUnit is not installed.
Thanks a lot
Upvotes: 4
Reputation: 14212
One wouldn't normally put test scripts onto the production server. But if you do need to run your tests there, and the tests rely on phpUnit (which they do), then you need to install phpUnit on that server. See http://phpUnit.de/ for download an install instructions.
You clearly already have phpUnit installed locally (whether you know it or not). Perhaps it was included in your PHP installation with whatever bundle/distro you're using.
Upvotes: 2