You are here

public function FontYourFaceInstallTest::testFontYourFaceSections in @font-your-face 8.3

Tests @font-your-face install and admin page shows up.

File

tests/src/Functional/FontYourFaceInstallTest.php, line 51

Class

FontYourFaceInstallTest
Tests that installing provides access to the necessary sections.

Namespace

Drupal\Tests\fontyourface\Functional

Code

public function testFontYourFaceSections() {

  // Main font selection page.
  $this
    ->drupalGet(Url::fromRoute('entity.font.collection'));
  $this
    ->assertText(t('Font Selector'));

  // Font display page.
  $this
    ->drupalGet(Url::fromRoute('entity.font_display.collection'));
  $this
    ->assertText(t('There are no font display entities yet.'));

  // Font display add page.
  $this
    ->drupalGet(Url::fromRoute('entity.font_display.add_form'));
  $this
    ->assertText(t('Please enable at least one font before creating/updating a font style.'));

  // Font settings page.
  $this
    ->drupalGet(Url::fromRoute('font.settings'));
  $this
    ->assertText(t('Settings form for @font-your-face. Support modules can use this form for settings or to import fonts.'));
  $this
    ->assertSession()
    ->responseContains(t('Import all fonts'));
}