FontYourFaceLocalFontInstallTest.php in @font-your-face 8.3
File
tests/src/Functional/FontYourFaceLocalFontInstallTest.php
View source
<?php
namespace Drupal\Tests\fontyourface\Functional;
use Drupal\Core\Url;
use Drupal\Tests\BrowserTestBase;
class FontYourFaceLocalFontInstallTest extends BrowserTestBase {
protected $defaultTheme = 'stark';
public static $modules = [
'views',
'fontyourface',
'local_fonts',
];
protected $adminUser;
protected function setUp() {
parent::setUp();
$this->adminUser = $this
->drupalCreateUser([
'administer font entities',
]);
$this
->drupalLogin($this->adminUser);
}
public function testFontYourFaceLocalFontsSection() {
$this
->drupalGet(Url::fromRoute('entity.local_font_config_entity.collection'));
$this
->assertText(t('There are no custom font entities yet.'));
$this
->drupalGet(Url::fromRoute('entity.local_font_config_entity.add_form'));
$this
->assertText(t('Name of the Custom Font'));
}
}