[Error] Class 'PHPUnit_Framework_Assert' not found

I’m suddenly finding that I’m getting this message everywhere in my set of tests. And I can’ty seem to see what’s changed in versions to make this happen. Here is an example test that is now failing


namespace tests\models;

use app\components\Helper;

use app\models\RepReportParams;

class ReportTest extends \Codeception\Test\Unit



    * @var UnitTester


    protected $tester;

    public function testTableDownLoadTime()




Here is my composer details too:

"require-dev" : {

		"yiisoft/yii2-debug" : "*",

		"yiisoft/yii2-gii" : "*",

		"yiisoft/yii2-faker" : "*",

		"codeception/base" : "^2.2.3",

		"codeception/verify" : "~0.3.1",

		"codeception/specify" : "~0.4.3",

		"phpunit/php-code-coverage" : "5.2"


Running into the same issue. I even search my project files for “PHPUnit_Framework_Assert” and to no avail. I’m still digging into the issue. If I find a solution, I’ll post it here.

New codeception version needs new codeception/verify version.

This version removed PHPUnit_Framework_Assert class_alias.

"require": {

        "codeception/codeception": "^2.4",

        "codeception/specify": "^1.0",

        "codeception/verify": "^1.0"


If you’re still having issue, run this following in your command line.

composer require codeception/codeception

composer require codeception/specify

composer require codeception/verify

Everything started working again after doing that.


Just had exactly the same problem with a fresh installed advanced application and just by executing the default tests delivered with it.

I can confirm that:

"require": {

        "codeception/codeception": "^2.4",

        "codeception/specify": "^1.0",

        "codeception/verify": "^1.0"


Resolved the issue.

Thank you guys!