lundi 5 janvier 2015

How to run php unit tests in Yii 1.1

Please help. I've been at this for days.


PHPUnit version: 4.4.0


Whenever I try to run a unit test, I get this error:



PHP Fatal error: Uncaught exception 'CException' with message 'CHttpRequest is unable to determine the request URI.' in /var/www/framework/web/CHttpRequest.php:519



My bootstrap file:



// change the following paths if necessary
set_include_path(get_include_path() . PATH_SEPARATOR . '/var/www/protected/config/vendor/phpunit/phpunit-selenium');
$yiit=dirname(__FILE__).'/../../framework/yiit.php';
$config=dirname(__FILE__).'/../config/test.php';

require_once($yiit);
require_once(dirname(__FILE__).'/WebTestCase.php');

Yii::createWebApplication($config);

Aucun commentaire:

Enregistrer un commentaire