You are here

public function MathjaxAdminTestCase::testAdmin in MathJax: LaTeX for Drupal 7

Test the configuration data.

File

tests/mathjax_admin.test, line 38
Admin page test file for MathJax module.

Class

MathjaxAdminTestCase
Admin test case for the module.

Code

public function testAdmin() {
  $this
    ->drupalLogin($this->administrator);
  $this
    ->drupalGet('admin/config/content/mathjax');
  $this
    ->assertTitle('MathJax | Drupal', 'Page title set.');
  $this
    ->assertText('Global switch');
  $this
    ->assertText('Check this box to enable MathJax for the entire site.');
  $this
    ->assertFieldChecked('edit-mathjax-enabled', 'MathJax is enabled by default.');
  $this
    ->assertText('MathJax CDN url');
  $this
    ->assertFieldByName('mathjax_cdn_url', mathjax_default_cdn_url(), 'Default CDN config string found.');
  $this
    ->assertText('Enter the Mathjax CDN url here or leave it unchanged to use the one provided by www.mathjax.org.');
  $this
    ->assertText('MathJax configuration');
  $this
    ->assertFieldByName('mathjax_config_string', mathjax_default_config_string(), 'Found default config string.');
  $this
    ->assertText('Enter a javascript configuration string as documented on');
}