freshbitsweb / laravel-log-enhancer

Make debugging easier by adding more data to your laravel logs (Laravel 5.6+)
MIT License
346 stars 33 forks source link

Testing with phpunit #7

Closed herpaderpaldent closed 6 years ago

herpaderpaldent commented 6 years ago

Hey @gauravmak

I have followed your guide on https://laravelfactory.com/blog/step-by-step-guide-to-laravel-package-development especially for testing of laravel packages and tried to incooperate it with one of my packages. https://github.com/herpaderpaldent/seat-groups/blob/tests/composer.json

Although i have pretty much copy cat you, when i try to run sh vendor/bin/phpunit vendor/herpaderpaldent/seat-groups i get the following error:

Fatal error: Class 'Herpaderpaldent\Seat\SeatGroups\Tests\TestCase' not found in /var/www/seat/vendor/herpaderpaldent/seat-groups/tests/SeatGroupIndexTest.php on line 9

It looks for me like some Namespace issues? Any tips?

herpaderpaldent commented 6 years ago

I think i found the issue: I had the package in the vendor folder of a laravel app. In order to run the tests i had to cd to the corresponding folder and run composer install after this my package had it's own vendor folder with all the dependencies and my tests could be executed.