gulp-phpunit | PHPUnit Plugin for Gulp | Frontend Framework library
kandi X-RAY | gulp-phpunit Summary
kandi X-RAY | gulp-phpunit Summary
PHPUnit Plugin for Gulp
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of gulp-phpunit
gulp-phpunit Key Features
gulp-phpunit Examples and Code Snippets
Community Discussions
Trending Discussions on gulp-phpunit
QUESTION
When I try to run gulp I get the title error.
My gulpfile.js:
...ANSWER
Answered 2019-Mar-21 at 13:59If you use gulp v4, the syntax has changed. You can downgrade your gulp version or change some parts of your code to run with the new gulp version:
QUESTION
I have a Gulpfile for a Laravel application. The unit tests for the application are executed via Gulp. To execute the tests correctly the following tasks should run in a synchronous order (via run-sequence).
- Back-up current .env file
- Set .env.testing as current .env file
- Create a database the unit tests will use
- Run the migrations
- Execute the unit tests
- Drop the test database
- Restore the back-up of the .env file we made in the beginning
This works fine, however, there is a problem when PHPUnit executes and one or more unit tests have failed. If this happens the sequence is broken and as a result switching back to the original environment doesn't happen and we're stuck at the testing environment.
That's why I would like to postpone the PHPUnit error to the end of the sequence. This way the environment gets restored but, for CI purposes, the build will still be marked as failed.
I've tried something myself with gulp-if and gulp-fail. The gulp-fail code is executed but the run-sequence keeps executing anyway. I don't know how to fix this.
Here's what I tried to catch the unit tests failure:
...ANSWER
Answered 2017-May-02 at 14:01After some fiddling around I figured out how I can make it work:
There is no need for the error-when-tests-failed
task, it was kind of hacky anyway.
You can pass a callback to the gulpSequence function, in this callback you can check if the didTestsFail
var is true, if so you can throw an error. The code looks as follows:
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install gulp-phpunit
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page