Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Testing with phpunit #7

Closed
herpaderpaldent opened this issue Oct 3, 2018 · 1 comment
Closed

Testing with phpunit #7

herpaderpaldent opened this issue Oct 3, 2018 · 1 comment

Comments

@herpaderpaldent
Copy link

herpaderpaldent commented Oct 3, 2018

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
Copy link
Author

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.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant