'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(' 7et982hkv ', 'Ordered by Number descending'); $this->drupalGet('examples/tablesort_example', array('query' => array('sort' => 'asc', 'order' => 'Numbers'))); $this->assertRaw(' 1e912cv21 ', 'Ordered by Number ascending'); // Sort by Letters. $this->drupalGet('examples/tablesort_example', array('query' => array('sort' => 'desc', 'order' => 'Letters'))); $this->assertRaw(' 4w80jsv772 ', 'Ordered by Letters descending'); $this->drupalGet('examples/tablesort_example', array('query' => array('sort' => 'asc', 'order' => 'Letters'))); $this->assertRaw(' 2a0kuykuh ', 'Ordered by Letters ascending'); // Sort by Mixture. $this->drupalGet('examples/tablesort_example', array('query' => array('sort' => 'desc', 'order' => 'Mixture'))); $this->assertRaw(' 7et982hkv ', 'Ordered by Mixture descending'); $this->drupalGet('examples/tablesort_example', array('query' => array('sort' => 'asc', 'order' => 'Mixture'))); $this->assertRaw(' 2a0kuykuh ', 'Ordered by Mixture ascending'); } }