FieldExampleMenuTest.php

Namespace

Drupal\Tests\field_example\Functional

File

modules/field_example/tests/src/Functional/FieldExampleMenuTest.php

View source
<?php

namespace Drupal\Tests\field_example\Functional;


/**
 * Test the user-facing menus in Field Example.
 *
 * @group field_example
 * @group examples
 *
 * @ingroup field_example
 */
class FieldExampleMenuTest extends FieldExampleBrowserTestBase {
  
  /**
   * Modules to enable.
   *
   * @var array
   */
  protected static $modules = [
    'field_example',
  ];
  
  /**
   * The installation profile to use with this test.
   *
   * This test class requires the "Tools" block.
   *
   * @var string
   */
  protected $profile = 'minimal';
  
  /**
   * Test for a link to the block example in the Tools menu.
   */
  public function testFieldExampleLink() {
    $assert = $this->assertSession();
    $this->drupalGet('');
    $assert->linkByHrefExists('examples/field-example');
  }
  
  /**
   * Tests field_example menus.
   */
  public function testBlockExampleMenu() {
    $assert = $this->assertSession();
    $this->drupalGet('examples/field-example');
    $assert->statusCodeEquals(200);
  }

}

Classes

Title Deprecated Summary
FieldExampleMenuTest Test the user-facing menus in Field Example.