-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Adjustment of creation path #3
Comments
Hi, in VSCode, try the following:
Let me know if that's what you need. |
What I meant is your plugin creates the directory "cases" inside the Test-Subdirectory and wants to delete it and recreate it if it already Exists. The following screenshot was taken in an empty workspace with a folder "tests/unit" preexisting: What I would love to define is to define my Testdirectory as "tests" and the "cases" folder as unit without overwriting existing files. Which would be pretty ouch in a laravel Project since laravel provides a test folder with subfolders a TestCase.php a Trait that is useable and Example tests. |
Gotcha. I'm pulling up the project now and will find out where that happens and fix it. It's been a while since I've looked at this, I need to make some updates to how the extension's unit tests are run, and also deal with some changes in how PHPUnit works (ex. now requires a : void return type on setUp and tearDown functions). Give me a day to dig into this a bit. Thanks for the feedback! |
I looked at the source code myself a bit and the following line is the "devil" in this case.
|
Yah, the part above that (the bit with "rimraf" in it) basically says "if they set something else up for unit testing, clear it out because I know what's right"... I'm not sure what I was thinking there, other than fear of bumping into a phpunit.xml or something that didn't play nice with what I was doing. I'm fixing that now, along with making sure I don't overwrite phpunit.xml, etc. if those files are already there. I'm also updating my template for the unit test and default phpunit.xml to be compatible with current phpunit.xml. |
Hi, I've posted an update, 0.0.6. If the configured test directory contains a phpunit.xml there already, it leaves it alone, and bases test off of PHPUnit's TestCase. If there is not a phpunit.xml, it will create a new one and put in it's own BaseTestCase class. I haven't tested this a lot yet, but if you want to take a look and let me know if I'm on the right track, I'd be obliged. Thanks. |
Sadly no I have the Updated plugin and after trying it it still wanted to delete my folder. So I locked into the code of the extension that was installed and it does not seem like the compiled code got updated. |
Greetings,
I recently decided to use this extension but I came upon a problem the Tests get created in the Wrong Directory.
It would be nice If their was a Setting to choose if tests get generated in the cases folder or not.
The text was updated successfully, but these errors were encountered: