diff --git a/features/search.feature b/features/search.feature index b4e08ef..b9698d4 100644 --- a/features/search.feature +++ b/features/search.feature @@ -6,11 +6,11 @@ Feature: Search Scenario: Searching for a page that does exist Given I am on "/wiki/Main_Page" When I fill in "search" with "Behavior Driven Development" - And I press "searchButton" + And I press "Search" Then I should see "agile software development" Scenario: Searching for a page that does NOT exist Given I am on "/wiki/Main_Page" When I fill in "search" with "Glory Driven Development" - And I press "searchButton" + And I press "Search" Then I should see "Search results" diff --git a/src/Behat/MinkExtension/ServiceContainer/Driver/BrowserKitFactory.php b/src/Behat/MinkExtension/ServiceContainer/Driver/BrowserKitFactory.php index 9b0e8d3..3d3ea6e 100644 --- a/src/Behat/MinkExtension/ServiceContainer/Driver/BrowserKitFactory.php +++ b/src/Behat/MinkExtension/ServiceContainer/Driver/BrowserKitFactory.php @@ -56,8 +56,15 @@ class BrowserKitFactory implements DriverFactory throw new \RuntimeException(sprintf('Class %s not found, did you install symfony/browser-kit 4.4+?', HttpBrowser::class)); } + $parameters[] = $config['http_client_parameters'] ?? []; + + $httpClientDefinition = new Definition(null, $parameters); + $httpClientDefinition->setFactory(HttpClient::class.'::create'); + return new Definition(BrowserKitDriver::class, [ - new Definition(HttpBrowser::class), + new Definition(HttpBrowser::class, [ + $httpClientDefinition, + ]), '%mink.base_url%', ]); }