Closed austenc closed 9 years ago
A good implementation would definitely be considered for a merge. I have to admit that I do not develop Laravel packages and so I don't have a good read on what is required for testing. And currently I lack the time to look into it.
Maybe PR #1782 may be of interest for this problem? This PR makes the path of the workbench directory configurable in the Laravel 5 module. Is that something that would fix your problem if it was implemented in the Laravel 4 module? Or do you need something else?
It seems like it would, thanks for the comment @janhenkgerritsen. What I've ended up doing for now is just using grunt to publish the tests from my vendor/whatever/package
folder to the main tests
directory and am just not keeping them under version control. I will try to implement the solution from PR #1782 in my scenario and if it works I'll be happy to submit a new PR to the Laravel 4 module if needed.
Ok thanks. Hopefully it fixes your issue.
If someone wants to implement this enhancement I will merge it, but I wont implement it myself. I will only implement new features for the Laravel5 module and not for the Laravel4 module, since Laravel 5 has been released for a while now.
I'm using laravel 4 and codeception 2.0.9 at the time of writing. I have several apps that all utilize the same (private) package. This package acts as a foundation in each app and is meant to be extended. So basically you create a laravel app, utilize our private package, and customize as needed for each scenario. What I'd like to be able to do is run the tests from the installed package and the tests from my outer (main) app. Without this, we won't be able to tell whether an override / extension of the code has broken some core function or not.
So I've got something like this
So, I'd like to run my tests down in the vendor folder, but also keep a few additional (per client) tests in the
/tests
directory. I've looked at the documentation and tried several things at this point:include
configuration set something like this in the maincodeception.yml
:autoload.php
at a path like/vendor/austenc/mypackage/vendor/autoload.php
. This is to be expected given this line in the codecept source for the Laravel 4 Module. In this case, there is no autoload folder relative to the package'scodeception.yml
and ideally it needs to use the root/vendor/autoload
directory..-c
flag to run tests in different locations, it basically leads me to the above outcome regardingvendor/autoload.php
/tests
folder someplace liketests/functional/mypackage/...
for each type of suite. While I thought might work at first, it seems unwieldy and tough to manage / keep track of.In terms of a solution, one idea is to make the Laravel 4 module a little bit 'smarter' about whether it's in the vendor folder or not. It appears (a couple lines up in the Laravel4 module source I linked) that similar consideration is already made for the workbench. If this is something that would get merged I am happy to dig into it and submit a pull request. I was hoping to get others opinions and make sure I'm not missing something prior to working up PR. Let me know if I can clarify anything about my scenario or if there's another solution someone has in mind. Thanks!
I'm hoping to get some feedback and/or have a discussion about running tests that exist in an installed package in the
vendor
folder.