Skip to content

Commit

Permalink
Remove the fork, depend on webflo/drupal-finder
Browse files Browse the repository at this point in the history
  • Loading branch information
claudiu-cristea committed Nov 16, 2022
1 parent 2541dcc commit fb19d31
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 91 deletions.
3 changes: 2 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@
"behat/mink-browserkit-driver": "^2.1.0",
"behat/mink-selenium2-driver": "~1.1",
"drupal/drupal-driver": "dev-master",
"symfony/http-client": "~4.4 || ^5 || ^6"
"symfony/http-client": "~4.4 || ^5 || ^6",
"webflo/drupal-finder": "^1.2"
},
"require-dev": {
"composer/installers": "^2",
Expand Down
88 changes: 0 additions & 88 deletions src/Drupal/DocumentElement.php

This file was deleted.

10 changes: 8 additions & 2 deletions src/Drupal/DrupalExtension/ServiceContainer/DrupalExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
use Behat\Testwork\ServiceContainer\ServiceProcessor;
use Drupal\DrupalExtension\Compiler\DriverPass;
use Drupal\DrupalExtension\Compiler\EventSubscriberPass;
use DrupalFinder\DrupalFinder;
use Symfony\Component\Config\Definition\Builder\ArrayNodeDefinition;
use Symfony\Component\Config\FileLocator;
use Symfony\Component\DependencyInjection\ContainerBuilder;
Expand Down Expand Up @@ -67,8 +68,13 @@ public function load(ContainerBuilder $container, array $config)
// of the page, pieces of texts inside the <head> section.
// @see https://github.com/minkphp/MinkBrowserKitDriver/issues/153
// @see https://www.drupal.org/project/drupal/issues/3175718
require_once(__DIR__ . '/../../DocumentElement.php');
class_alias('\Drupal\DocumentElement', '\Behat\Mink\Element\DocumentElement', true);
$drupalFinder = new DrupalFinder();
if (!$drupalFinder->locateRoot(getcwd())) {
throw new \RuntimeException('Cannot locate Drupal');
}
$drupalRoot = $drupalFinder->getDrupalRoot();
require_once($drupalRoot . '/core/tests/Drupal/Tests/DocumentElement.php');
class_alias('\Drupal\Tests\DocumentElement', '\Behat\Mink\Element\DocumentElement', true);

$loader = new YamlFileLoader($container, new FileLocator(__DIR__ . '/config'));
$loader->load('services.yml');
Expand Down

0 comments on commit fb19d31

Please sign in to comment.