You are here

public function EntityEmbedDialogTest::testEntityEmbedFunctionality in Entity Embed 8

Tests entity embed functionality.

File

tests/src/Functional/EntityEmbedDialogTest.php, line 111

Class

EntityEmbedDialogTest
Tests the entity_embed dialog controller and route.

Namespace

Drupal\Tests\entity_embed\Functional

Code

public function testEntityEmbedFunctionality() {
  $edit = [
    'entity_id' => $this->node
      ->getTitle() . ' (' . $this->node
      ->id() . ')',
  ];
  $this
    ->drupalGet('/entity-embed/dialog/custom_format/node');
  $this
    ->drupalPostForm(NULL, $edit, t('Next'));

  // Tests that the embed dialog doesn't trow a fatal in
  // ImageFieldFormatter::isValidImage()
  $this
    ->assertSession()
    ->statusCodeEquals(200);
}