This information is from the code coverage report (see http://coverage.cwgordon.com/coverage).

We need to test:

1) tablesort_header() with an existing cell class.
2) tablesort_header() with an existing query string.
3) Actual tablesorting.

Comments

Wisif’s picture

Assigned: Unassigned » Wisif

I expect within 3 weeks to test

catch’s picture

Title: Tests needed: tablesort.inc » TestingParty08: tablesort.inc
Assigned: Wisif » Unassigned

Opening this up for the testing party.

SeeSchloss’s picture

StatusFileSize
new1.84 KB

Tests for 1 and 2

ekes and SeeSchloss

webchick’s picture

Status: Active » Needs review

Patch failed to apply. More information can be found at http://testing.drupal.org/node/13893. If you need help with creating patches please look at http://drupal.org/patch/create

dries’s picture

Status: Needs review » Needs work
lilou’s picture

Status: Needs work » Needs review
StatusFileSize
new1.91 KB
cwgordon7’s picture

Assigned: Unassigned » cwgordon7
Status: Needs review » Needs work

Various tabs in various places, coding standards generally needs work on this.

lilou’s picture

Status: Needs work » Needs review
StatusFileSize
new2.01 KB

Clean patch.

lilou’s picture

Status: Needs review » Needs work

Miss 3)

cwgordon7’s picture

Status: Needs work » Needs review
StatusFileSize
new2.21 KB

Re-rolled, 4 passes, 0 fails, 0 exceptions.

cwgordon7’s picture

Note that these are unit tests, it would be great to have functional tests too eventually.

cwgordon7’s picture

Meh. Cross-posted, apologies.

moshe weitzman’s picture

Seems like we could test this whenever we test admin/content/node or similar page.

chrisshattuck’s picture

Status: Needs review » Needs work

Sorry, trying to figure out patching, made a little mistake and didn't patch it properly.

chrisshattuck’s picture

Status: Needs work » Needs review

Switched status previously based on a bad patch experience. Switching it back to review.

chrisshattuck’s picture

Status: Needs review » Reviewed & tested by the community

Patched and ran test successfully:
4 passes, 0 fails, 0 exceptions

webchick’s picture

Status: Reviewed & tested by the community » Needs work

Since this is a testing party patch, I'm going to be mercilessly nit-picky in this review. It's only because I care. :)

This one was actually hard. :P I had to think about it for awhile.

+    $ts = array('name' => '', 'sort' => 'asc', 'query_string' => '');

a) I realize it's easy enough to deduce that $ts == $tablesort, but it'd be nice to be explicit about that fact. Needs changing throughout.
b) Coding standards dictate each of these on their own lines. However, this is consistent with the way table-related arrays are done so I'm leaving it alone for now.

+    $this->assertEqual($new_cell['class'], 'red active');

Red active? What does that mean? Could you add a message parameter here with more specifics about what's being tested? The general rule of thumb is that by reading the output of the messages in SimpleTest module, we can learn what the test run tested for. This advice applies throughout.

+    $this->assertEqual($new_cell['class'], 'active');

Same here.

+   * Tests the handling of additional query strings by Druapl's tablesort API.

What's Druapl? :)

catch’s picture

Component: tests » base system
Category: bug » task
Priority: Critical » Normal

Fixing the critical / pending bugs queues to reflect things which are really bugs or release critical.

Status: Needs work » Closed (outdated)

Automatically closed because Drupal 7 security and bugfix support has ended as of 5 January 2025. If the issue verifiably applies to later versions, please reopen with details and update the version.