You are here

public function MathjaxWebTestCase::testLibraryDetection in MathJax: LaTeX for Drupal 7.2

Tests the detection of MathJax libraries.

File

./mathjax.test, line 88
Web test file for MathJax module.

Class

MathjaxWebTestCase
Web test case for the module.

Code

public function testLibraryDetection() {
  $this
    ->drupalLogin($this->administrator);
  $this
    ->drupalGet('admin/reports/status');
  $this
    ->assertNoText('MathJax is configured to use local library files but the libraries module is not enabled. See the README.');
  $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 = array(
    'mathjax_use_cdn' => FALSE,
  );
  $this
    ->drupalPost(NULL, $edit, t('Save configuration'));
  $this
    ->drupalGet('admin/reports/status');
  $this
    ->assertText('MathJax is configured to use local library files but the libraries module is not enabled. See the README.');
  $this
    ->assertText('MathJax is configured to use local library files but they could not be found. See the README.');
}