-
Notifications
You must be signed in to change notification settings - Fork 328
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
Use consistent php binary for running dusk tests #51
Conversation
It is always available. Just use it directly in the callback. |
@@ -46,7 +46,7 @@ public function handle() | |||
$options = implode(' ', array_slice($_SERVER['argv'], 2)); | |||
|
|||
$this->withDuskEnvironment(function () use ($options) { | |||
(new Process(trim('php vendor/bin/phpunit -c "'.base_path('phpunit.dusk.xml').'" '.$options), base_path(), [])) | |||
(new Process(trim(PHP_BINARY . ' vendor/bin/phpunit -c "'.base_path('phpunit.dusk.xml').'" '.$options), base_path(), [])) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We never use spaces when concatenating.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
whoops, sorry!
Thanks for this fix @splatEric, I was running into the same error with trying to get setup Codeship. Sorry to hijack the thread, but I was wondering if you could share what steps you are taking to get dusk to run on Codeship now, if you have it working? Are you using artisan to serve the app? I am now getting these errors:
|
Funnily enough, I wrote up the codeship stuff as well:
https://medium.com/@splatEric/laravel-dusk-on-codeship-e37735af1759?source=linkShare-1f0d75c85096-1485547264
On 27 Jan 2017, at 20:00, Joey Kudish <notifications@github.com> wrote:
Thanks for this fix @splatEric <https://github.com/splatEric>, I was
running into the same error with trying to get setup Codeship.
Sorry to hijack the thread, but I was wondering if you could share what
steps you are taking to get dusk to run on Codeship now, if you have it
working? Are you using artisan to serve the app? I am now getting these
errors:
Curl error thrown for http POST to /session with params
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#51 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/ACVP6PQs0JVnsTA70iJZWfhdMLg8tz0iks5rWky4gaJpZM4Ls2oS>
.
|
Thanks a lot @splatEric that's super handy 👍 |
When trying to get dusk tests running on codeship, I ran into a problem where the php that was being triggered from the Process was call not consistent with the php binary I was using to run the command. This pull request tackles this by making using of the
PHP_BINARY
constant to use the same version of php.I wrote this defensively as I wasn't sure if there might be circumstances under which the
PHP_BINARY
constant was not set.