Yii 1 with Codeception API testing code coverage

I use Yii 1.1.14 and codeception api testing. I added the "c3.php" in head of my index-test.php as below:

<?php

/**

  • This is the bootstrap file for test application.

  • This file should be removed when the application is deployed for production.

*/

include DIR.’/protected/tests/codeception/c3.php’;

// change the following paths if necessary

$yii=dirname(FILE).’/../framework/yii.php’;

$config=dirname(FILE).’/protected/config/test.php’;

// remove the following line when in production mode

defined(‘YII_DEBUG’) or define(‘YII_DEBUG’,true);

require_once($yii);

Yii::createWebApplication($config)->run();

/////////////////////////////////////////////////////////////////////////////////////////////////

When I’m running the code coverage, some of the tests are passed but some are failed:

Array

(

[code] =&gt; 500


[type] =&gt; PHP warning


[message] =&gt; include(PHP_Invoker.php): failed to open stream: No such file or directory


[file] =&gt; /Users/qixiaobin/web/framework/YiiBase.php


[line] =&gt; 427


[trace] =&gt; #0 /Users/qixiaobin/web/framework/YiiBase.php(427): autoload()

#1 unknown(0): autoload()

#2 unknown(0): spl_autoload_call()

#3 phar:///Users/qixiaobin/web/tripplusme-new/protected/tests/codeception/codecept.phar/vendor/phpunit/php-code-coverage/src/CodeCoverage/Filter.php(319): class_exists()

#4 phar:///Users/qixiaobin/web/tripplusme-new/protected/tests/codeception/codecept.phar/vendor/phpunit/php-code-coverage/src/CodeCoverage/Filter.php(306): PHP_CodeCoverage_Filter->addDirectoryContainingClassToBlacklist()

#5 phar:///Users/qixiaobin/web/tripplusme-new/protected/tests/codeception/codecept.phar/vendor/phpunit/php-code-coverage/src/CodeCoverage/Filter.php(259): PHP_CodeCoverage_Filter->prefillBlacklist()

#6 phar:///Users/qixiaobin/web/tripplusme-new/protected/tests/codeception/codecept.phar/vendor/phpunit/php-code-coverage/src/CodeCoverage.php(518): PHP_CodeCoverage_Filter->isFiltered()

#7 phar:///Users/qixiaobin/web/tripplusme-new/protected/tests/codeception/codecept.phar/vendor/phpunit/php-code-coverage/src/CodeCoverage.php(287): PHP_CodeCoverage->applyListsFilter()

#8 phar:///Users/qixiaobin/web/tripplusme-new/protected/tests/codeception/codecept.phar/vendor/phpunit/php-code-coverage/src/CodeCoverage.php(260): PHP_CodeCoverage->append()

#9 /Users/qixiaobin/web/tripplusme-new/protected/tests/codeception/c3.php(233): PHP_CodeCoverage->stop()

#10 unknown(0): {closure}()

[version] =&gt; PHP 5.5.19 Development Server &lt;a href=&quot;http://www.yiiframework.com/&quot;&gt;Yii Framework&lt;/a&gt;/1.1.14


[time] =&gt; 2015-06-18 10:15:05


[admin] =&gt; the webmaster

)

It seems that there are something broken about the autoload.

Anyone can help?

Well, the error message itself confirms that the autoloader is working fine, but it can’t find PHP_Invoker.php file. Make sure this is the right class and file name. If this file is in some newly created folder or subfolder, then import it in main.php configuration file.







'import'=>array(

		'application.models.*',

		'application.components.*',

		'application.modules.*'

		'application.YOUR-FOLDER-NAME.*'

	),