'TableSort Example',
'description' => 'Verify the tablesort functionality',
'group' => 'Examples',
);
}
/**
* {@inheritdoc}
*/
public function setUp() {
// Enable the module.
parent::setUp('tablesort_example');
}
/**
* Verify the functionality of the example module.
*/
public function testTableSortPage() {
// No need to login for this test.
$this->drupalGet('examples/tablesort_example', array('query' => array('sort' => 'desc', 'order' => 'Numbers')));
$this->assertRaw('
7 | e | t982hkv |
', 'Ordered by Number descending');
$this->drupalGet('examples/tablesort_example', array('query' => array('sort' => 'asc', 'order' => 'Numbers')));
$this->assertRaw('
1 | e | 912cv21 |
', 'Ordered by Number ascending');
// Sort by Letters.
$this->drupalGet('examples/tablesort_example', array('query' => array('sort' => 'desc', 'order' => 'Letters')));
$this->assertRaw('
4 | w | 80jsv772 |
', 'Ordered by Letters descending');
$this->drupalGet('examples/tablesort_example', array('query' => array('sort' => 'asc', 'order' => 'Letters')));
$this->assertRaw('
2 | a | 0kuykuh |
', 'Ordered by Letters ascending');
// Sort by Mixture.
$this->drupalGet('examples/tablesort_example', array('query' => array('sort' => 'desc', 'order' => 'Mixture')));
$this->assertRaw('
7 | e | t982hkv |
', 'Ordered by Mixture descending');
$this->drupalGet('examples/tablesort_example', array('query' => array('sort' => 'asc', 'order' => 'Mixture')));
$this->assertRaw('
2 | a | 0kuykuh |
', 'Ordered by Mixture ascending');
}
}