khanamiryan/php-qrcode-detector-decoder

Fatal error: Uncaught Error: Class 'Khanamiryan\QrCodeTests\PHPUnit\Framework\TestCase' not found in C:\xampp\htdocs\php-qrcode-detector-decoder-master\tests\QrReaderTest.php:7 Stack trace: #0 {main} thrown in C:\xampp\htdocs\php-qrcode-detector-decoder-master\tests\QrReaderTest.php on line 7

edrngrc opened this issue · 5 comments

Fatal error: Uncaught Error: Class 'Khanamiryan\QrCodeTests\PHPUnit\Framework\TestCase' not found in C:\xampp\htdocs\php-qrcode-detector-decoder-master\tests\QrReaderTest.php:7 Stack trace: #0 {main} thrown in C:\xampp\htdocs\php-qrcode-detector-decoder-master\tests\QrReaderTest.php on line 7

@edrngrc which version of PHP are you using?

@edrngrc which version of PHP are you using?

My PHP version is PHP 7.4.1

Okay so your PHP version is not the problem.
I believe that the library is not linked correctly with Composer on your system. Did you install all the dependencies? In which case is the error message coming? Do you try running the QrReaderTest class directly?

Okay so your PHP version is not the problem.
I believe that the library is not linked correctly with Composer on your system. Did you install all the dependencies? In which case is the error message coming? Do you try running the QrReaderTest class directly?

Yes, I tried run the reader test file

This is not how it should be used. You need to install composers dependencies and load composers autoload.php to have access to all other classes. To use the test classes, you need PHPUnit to execute them. Having composers dependencies installed, this can be done by running $ php vendor/bin/phpunit.

But to be honest, this is not the right place for those explanations. Would you please close that issue? Thanks. :-)