Skip to content
This repository has been archived by the owner on Mar 31, 2020. It is now read-only.

Gulp PhpUnit Fix for Windows #519

Merged
merged 1 commit into from Jun 7, 2016
Merged

Gulp PhpUnit Fix for Windows #519

merged 1 commit into from Jun 7, 2016

Conversation

pataelmo
Copy link
Contributor

Wrapped the path used to call phpunit from gulp with path.normalize. This makes gulp able to run phpUnit from Windows. Haven't tested to ensure this didn't break anything for mac or linux, but hopefully it should be pretty safe.

…e command to work on all OS's (Currently on windows it doesn't work because the path uses forward slashes).
@onecentlin
Copy link

I tried these modified changes in both Windows and Mac. Gulp phpunit testing works properly.

@JeffreyWay JeffreyWay force-pushed the master branch 3 times, most recently from c25f6c5 to 65fb33f Compare May 26, 2016 21:29
@pataelmo
Copy link
Contributor Author

I don't know the easiest way to test as I've just been learning laravel, but it would seem that changes in commit b20e61e make this pull request unnecessary.

Assuming Elixir.Plugins.shell() can take a path with /'s on windows and execute properly then the aforemention commit change should mean that any and all tasks should be fixed for elixir and not just PHPUnit.

@JeffreyWay can you confirm that is true? If so then I'll close this pull request. Also if you don't mind letting me know the best way to see this in a composer based laravel install (or pointing me to docs that show how to do so) would be great. Thanks!

@JeffreyWay
Copy link
Contributor

Not sure yet. Need to try out on Windows when I have a chance.

Try doing npm install git://github.com/pataelmo/elixir.git in a fresh Laravel project to try things out.

@JeffreyWay JeffreyWay force-pushed the master branch 2 times, most recently from f7bd278 to 01c89b1 Compare June 2, 2016 06:44
@onecentlin
Copy link

Without modifying current laravel-elixir, I change phpunit options in gulpfile.js settings.

Here is my gulpfile.js file:

var elixir = require('laravel-elixir');
var path = require('path');

elixir(function(mix) {
    mix.phpUnit([] , path.normalize('vendor/bin/phpunit') + ' --verbose');
});

@pascal08
Copy link

pascal08 commented Jun 7, 2016

@onecentlin Works for me on Windows 10 x64, so I will be using this until this is merged.

@JeffreyWay JeffreyWay merged commit 6560c0b into laravel:master Jun 7, 2016
@kidtangerine
Copy link

@onecentlin works for me too. thanks.

@mbaljeetsingh
Copy link

@onecentlin This worked for me too (Windows 10 x64)

@tannakartikey
Copy link

tannakartikey commented Jul 29, 2016

@pataelmo Thanks. Working fine on Windows 10

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
7 participants