You are here

public function TokenFieldUiTest::testFileFieldUi in Token 8

File

tests/src/Functional/TokenFieldUiTest.php, line 103

Class

TokenFieldUiTest
Tests field ui.

Namespace

Drupal\Tests\token\Functional

Code

public function testFileFieldUi() {
  $this
    ->drupalGet('admin/structure/types/manage/article/fields/node.article.field_image');

  // Ensure the 'Browse available tokens' link is present and correct.
  $this
    ->assertSession()
    ->linkExists('Browse available tokens.');
  $this
    ->assertSession()
    ->linkByHrefExists('token/tree');

  // Ensure that the default file directory value validates correctly.
  $this
    ->drupalPostForm(NULL, [], 'Save settings');
  $this
    ->assertText(t('Saved Image configuration.'));
}