protected function BlazyFilterJavaScriptTest::setUp in Blazy 8.2
Overrides BrowserTestBase::setUp
File
- tests/
src/ FunctionalJavascript/ BlazyFilterJavaScriptTest.php, line 48
Class
- BlazyFilterJavaScriptTest
- Tests the Blazy Filter JavaScript using Selenium, or Chromedriver.
Namespace
Drupal\Tests\blazy\FunctionalJavascriptCode
protected function setUp() {
parent::setUp();
$this
->setUpVariables();
$this->root = $this->container
->get('app.root');
$this->fileSystem = $this->container
->get('file_system');
$this->entityFieldManager = $this->container
->get('entity_field.manager');
$this->formatterPluginManager = $this->container
->get('plugin.manager.field.formatter');
$this->blazyAdmin = $this->container
->get('blazy.admin');
$this->blazyOembed = $this->container
->get('blazy.oembed');
$this->blazyManager = $this->container
->get('blazy.manager');
$this->testPluginId = 'blazy_filter';
$this->maxParagraphs = 280;
// Create a text format.
$full_html = FilterFormat::create([
'format' => 'full_html',
'name' => 'Full HTML',
'weight' => 0,
]);
$full_html
->save();
// Enable the Blazy filter.
$this->filterFormatFull = FilterFormat::load('full_html');
$this->filterFormatFull
->setFilterConfig('blazy_filter', [
'status' => TRUE,
]);
$this->filterFormatFull
->save();
$this
->setUpRealImage();
}