lundi 30 juillet 2018

How to run Laravel package tests?

I am creating a package and I want to write tests. There is a great library called Orchestral/Testbench created especially for package testing. But here is a problem: I do not know how to run tests properly.

I want to include some files so it would be easier to solve this problem (Gist link): https://gist.github.com/BobieBobie/43757036bc18fdea264f1f189368a17b

And here is my directory structure (screenshot): http://prntscr.com/kcnufs

When I am running the test from IDE (PHPStorm), it tells me, that it cannot find vendor/autoload within packages folder (it is obvious). But when I change the bootstrap path (in phpunit.xml) with "../../../vendor/autoload.php", it says:

Fatal error: Class 'Nod\Parser\Tests\IntegrationTest' not found As you could see my namesp

Help me, please. Ty in advance!

Aucun commentaire:

Enregistrer un commentaire