kenjis / ci-phpunit-test

An easier way to use PHPUnit with CodeIgniter 3.x.
http://kenjis.github.io/ci-phpunit-test/
MIT License
586 stars 195 forks source link

PHP Fatal error: Uncaught Error: Class 'PHPUnit\Framework\TestCase' not found #370

Closed PooranSinghTricon closed 3 years ago

PooranSinghTricon commented 3 years ago

I have CodeIgniter 2.x with PHP 7.4. I followed all your given instructions

  1. composer.json require => "kenjis/ci-phpunit-test":"^3.0"

    1. composer update

    2. within root dir : php vendor/kenjis/ci-phpunit-test/install.php --from-composer it does not install completely. if I execute my step 3 as -> within root dir : php vendor/kenjis/ci-phpunit-test/install.php it install complete.

Now how to run ? 1. cd application/tests/ 2. PHPUnit

it gives "PHP Fatal error: Uncaught Error: Class 'PHPUnit\Framework\TestCase' not found in D:\xampp\htdocs\ubw-testing\application\tests_ci_phpunit_test\CIPHPUnitTestCase.php:24"

image

I did too much R&D on google. Nothing work. Can you please help to find the solution ? if I need to change any file or code , Please let me know.

kenjis commented 3 years ago

I'm sorry, ci-phpunit-test supports only CI 3.x.

kenjis commented 3 years ago

See https://github.com/kenjis/my-ciunit for CI 2.x.