There are currently 2 fails and ~25 exceptions when running the tests in 6.x-1.x.

The attached patch fixes those test fails and consists of:

- Mostly E_NOTICE fixes (Tests must not throw E_NOTICE under Drupal 6 since some time)
- There is one small change and that is a case when userpoints_userpointsapi() is called with a txn_id + expired = 1 values. The current checks for the $msg (earned/lost/..) do not account for that combination and would wrongly use earned. Added $msg = 'expired'.
- Simplified and fixed expiry_date and tid/vid tests. The expiry_date tests used a fixed date of 2010/01/01, but it is not possible to select a expiry date in the past so that test failed. It is also not necessary to submit default values and not useful to directly check the {variables} table.

Once this is in, we can think about enabling automated testing, the D7 tests already pass.

CommentFileSizeAuthor
fix_tests.patch9.6 KBberdir

Comments

berdir’s picture

Issue tags: +userpoints backport

Tagging to make it easier to find patches like this one.

berdir’s picture

testing...

berdir’s picture

Status: Needs review » Fixed

Commited.

Status: Fixed » Closed (fixed)
Issue tags: -userpoints backport

Automatically closed -- issue fixed for 2 weeks with no activity.