You are here

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

Ensure the MathJax filter is at the bottom of the processing order.

File

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

Class

MathjaxWebTestCase
Web test case for the module.

Code

public function testFilterOrder() {
  $this
    ->drupalLogin($this->administrator);

  // Activate the MathJax filter on the filtered_html text format.
  $this
    ->drupalGet('admin/config/content/formats/filtered_html');
  $edit = array(
    'filters[filter_mathjax][status]' => TRUE,
  );
  $this
    ->drupalPost(NULL, $edit, t('Save configuration'));

  // Ensure that MathJax appears at the bottom of the filter list.
  $result = $this
    ->xpath("//table[@id='filter-order']/tbody/tr[last()]/td[1]");
  $this
    ->assertEqual($result[0]
    ->__toString(), 'MathJax');
}