You are here

public function MathjaxWebTest::testLibraryDetection in MathJax: LaTeX for Drupal 3.0.x

Tests the detection of MathJax libraries.

File

tests/src/Functional/MathjaxWebTest.php, line 96

Class

MathjaxWebTest
Configuration test case for the module.

Namespace

Drupal\Tests\mathjax\Functional

Code

public function testLibraryDetection() {
  $this
    ->drupalLogin($this->administrator);
  $this
    ->drupalGet('admin/reports/status');
  $this
    ->assertNoText('MathJax is configured to use local library files but they could not be found. See the README.');
  $this
    ->drupalGet('admin/config/content/mathjax');
  $edit = [
    'use_cdn' => FALSE,
  ];
  $this
    ->drupalPostForm(NULL, $edit, t('Save configuration'));
  $this
    ->drupalGet('admin/reports/status');
  $this
    ->assertText('MathJax is configured to use local library files but they could not be found. See the README.');
}