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 Dec 23, 2022
1 parent 98c7765 commit 970263a
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 90 deletions.
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 970263a

Please sign in to comment.