You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello there ! Just a little thing that bugs me, you can't use Behat's own dependency injection system (it's not documented a lot so not a lot of person are using it) you can learn more about it here :
In LaravelArgumentResolver.php line 48:
[ErrorException]
substr() expects parameter 1 to be string, object given
Exception trace:
() at /Users/gabriel/Workspace/taskl/vendor/laracasts/behat-laravel-extension/src/Context/Argument/LaravelArgumentResolver.php:48
Illuminate\Foundation\Bootstrap\HandleExceptions->handleError() at n/a:n/a
This is because LaravelArgumentResolver only resolve argument "Laravel way" and don't care if the argument has aleady be resolved by Behat (which is the case here). This can be solved by changing the behat.yml to :
Hello there ! Just a little thing that bugs me, you can't use Behat's own dependency injection system (it's not documented a lot so not a lot of person are using it) you can learn more about it here :
So, for example, this does not work :
And produce the error :
This is because
LaravelArgumentResolver
only resolve argument "Laravel way" and don't care if the argument has aleady be resolved by Behat (which is the case here). This can be solved by changing the behat.yml to :But this forces us to use Laravel DI (and I can't set constructor arguments in behat.yml this way).
This is probably an easy fix, I could do it if I take the time, at least it's documented now :) Thanks for the good work.
The text was updated successfully, but these errors were encountered: