DrupalContext.php in Views field formatter 8.2
File
tests/Behat/DrupalContext.php
View source
<?php
declare (strict_types=1);
namespace Drupal\Tests\views_field_formatter\Behat;
use Behat\Testwork\Hook\Scope\AfterSuiteScope;
use Behat\Testwork\Hook\Scope\BeforeSuiteScope;
use Drupal\DrupalExtension\Context\RawDrupalContext;
class DrupalContext extends RawDrupalContext {
public static function installTestModule(BeforeSuiteScope $scope) : void {
\Drupal::service('module_installer')
->install([
'views_field_formatter_test',
]);
}
public static function uninstallTestModule(AfterSuiteScope $scope) : void {
\Drupal::service('module_installer')
->uninstall([
'views_field_formatter_test',
]);
}
}