thomasesmith / php-vw-car-net

An unofficial PHP wrapper for the VW Car-Net API
12 stars 3 forks source link

I am running into the issue: Class 'PHPUnit\Framework\TestCase' not found #4

Closed thomasesmith closed 4 years ago

thomasesmith commented 4 years ago

Thanks - now I am running into the next issue:

Fatal error: Uncaught Error: Class 'PHPUnit\Framework\TestCase' not found in /home/stephan/GitHub/vendor/thomasesmith/php-vw-car-net/tests/AuthenticationTest.php:20 Stack trace: #0 {main} thrown in /home/stephan/GitHub/vendor/thomasesmith/php-vw-car-net/tests/AuthenticationTest.php on line 20

I could not find the definition of the class „TestCase“

Originally posted by @mtbsteve in https://github.com/thomasesmith/php-vw-car-net/issues/3#issuecomment-687575432

thomasesmith commented 4 years ago

Composer didn't install for you this package's one dev dependency 'PHPUnit'. PHPUnit needs to be installed by Composer in order to run the tests in this repo. It is my understanding that Composer doesn't install downstream dev dependencies, only the dev dependencies in your root composer.json

A solution for you would be to run composer require phpunit/phpunit --dev, and Composer will install PHPUnit in to your project. Then check out the PHPUnit documentation https://phpunit.readthedocs.io to learn more about how to run the tests.

thomasesmith commented 4 years ago

Closing issue since it's more about your particular configuration than the package, but feel free to continue to comment.

mtbsteve commented 4 years ago

Thanks for your help Thomas. I installed phpunit and it works now. Please excuse my dumb questions- I am a total noob on php.

thomasesmith commented 4 years ago

There are no dumb questions. All of this would be confusing to anyone who doesn't use PHP with regularity.