You are here

protected function ResponsiveWrappersTest::setUp in Responsive wrappers 2.0.x

Same name and namespace in other branches
  1. 8 tests/src/Functional/ResponsiveWrappersTest.php \Drupal\Tests\responsivewrappers\Functional\ResponsiveWrappersTest::setUp()

Overrides BrowserTestBase::setUp

File

tests/src/Functional/ResponsiveWrappersTest.php, line 48

Class

ResponsiveWrappersTest
Provides a class for responsivewrappers functional tests.

Namespace

Drupal\Tests\responsivewrappers\Functional

Code

protected function setUp() {
  parent::setUp();
  $this->user = $this
    ->drupalCreateUser([
    'access content',
    'access administration pages',
    'administer filters',
  ]);
  FilterFormat::create([
    'format' => 'full_html',
    'name' => 'Full HTML',
    'weight' => 1,
    'filters' => [],
  ])
    ->save();
  $this
    ->drupalCreateContentType([
    'type' => 'page',
    'name' => 'Basic Page',
  ]);
  $this->node = $this
    ->drupalCreateNode([
    'type' => 'page',
    'title' => 'Responsive filter test',
    'body' => [
      'value' => '<img scr="#" /><table></table><iframe src="https://www.youtube.com/embed/"></iframe><iframe src="https://player.vimeo.com/video/"></iframe>',
      'format' => 'full_html',
    ],
  ]);
  $this
    ->drupalLogin($this->user);
}