BlazyIoJavaScriptTest.php in Blazy 8.2
File
tests/src/FunctionalJavascript/BlazyIoJavaScriptTest.php
View source
<?php
namespace Drupal\Tests\blazy\FunctionalJavascript;
class BlazyIoJavaScriptTest extends BlazyJavaScriptTestBase {
protected function setUp() {
parent::setUp();
$this->scriptLoader = 'io';
$this->container
->get('config.factory')
->getEditable('blazy.settings')
->set('io.enabled', TRUE)
->save();
$this->container
->get('config.factory')
->getEditable('blazy.settings')
->set('decode', TRUE)
->save();
$this->container
->get('config.factory')
->clearStaticCache();
}
public function testFormatterDisplay() {
$data['settings']['blazy'] = TRUE;
$data['settings']['ratio'] = '';
$data['settings']['image_style'] = 'thumbnail';
$this
->setUpContentTypeTest($this->bundle);
$this
->setUpFormatterDisplay($this->bundle, $data);
$this
->setUpContentWithItems($this->bundle);
$this
->drupalGet('node/' . $this->entity
->id());
$result = $this
->assertSession()
->waitForElement('css', '.b-lazy');
$this
->assertNotEmpty($result);
$this
->doTestFormatterDisplay();
}
}