I wrote a package, and as part of the development process, I want to run unit tests on it. This basically means that I need a boot file to register the autoloader for my package.
Any package that I look at does not have a specific boot file, so I donβt quite understand how developers test their own packages.
This is my directory structure.
src .CompanyName ..PackageName ...Class 1 ...Class 2 tests .Class1Test .Class2Test composer.json phpunit.xml.dist
Now, if I run phpunit inside the root directory, all my tests say that \\CompanyName\\PackageName\\Class1 not found. This is legal, since no one turned them on. So the question is: How and when do I include my classes .
Looking at random packages I can see that they rely on vendor/autoload.php , but I don't have this provider. Do I have to run composer install in order for it to be created?
source share