- <?php
- * @file
- * Simpletest case for tablesort_example module.
- */
-
- * Functionality tests for the tablesort example module.
- *
- * @ingroup tablesort_example
- */
- class TableSortExampleTestCase extends BackdropWebTestCase {
-
-
- * {@inheritdoc}
- */
- public function setUp() {
-
- parent::setUp('tablesort_example');
- }
-
-
- * Verify the functionality of the example module.
- */
- public function testTableSortPage() {
-
- $this->backdropGet('examples/tablesort_example', array('query' => array('sort' => 'desc', 'order' => 'Numbers')));
- $this->assertRaw("<tbody>\n <tr class=\"odd\"><td class=\"active\">7</td><td>e</td><td>t982hkv</td> </tr>", 'Ordered by Number decending');
-
- $this->backdropGet('examples/tablesort_example', array('query' => array('sort' => 'asc', 'order' => 'Numbers')));
- $this->assertRaw("<tbody>\n <tr class=\"odd\"><td class=\"active\">1</td><td>e</td><td>912cv21</td> </tr>", 'Ordered by Number ascending');
-
-
- $this->backdropGet('examples/tablesort_example', array('query' => array('sort' => 'desc', 'order' => 'Letters')));
- $this->assertRaw("<tbody>\n <tr class=\"odd\"><td>4</td><td class=\"active\">w</td><td>80jsv772</td> </tr>", 'Ordered by Letters decending');
-
- $this->backdropGet('examples/tablesort_example', array('query' => array('sort' => 'asc', 'order' => 'Letters')));
- $this->assertRaw("<tbody>\n <tr class=\"odd\"><td>2</td><td class=\"active\">a</td><td>0kuykuh</td> </tr>", 'Ordered by Letters ascending');
-
-
- $this->backdropGet('examples/tablesort_example', array('query' => array('sort' => 'desc', 'order' => 'Mixture')));
- $this->assertRaw("<tbody>\n <tr class=\"odd\"><td>7</td><td>e</td><td class=\"active\">t982hkv</td> </tr>", 'Ordered by Mixture decending');
-
- $this->backdropGet('examples/tablesort_example', array('query' => array('sort' => 'asc', 'order' => 'Mixture')));
- $this->assertRaw("<tbody>\n <tr class=\"odd\"><td>2</td><td>a</td><td class=\"active\">0kuykuh</td> </tr>", 'Ordered by Mixture ascending');
- }
-
- }