Problem/Motivation

The API test is a bit of a mess. Multiple features of the API are tested in one test method, making it harder to follow and to extend. For issue #1986798: Don't allow two addresses marked as the same default type through the API an addition to this test case is needed. As such, the test case should be refactored.

Proposed resolution

Split the method testAddressBookAPI() in multiple test methods, preferably each method for one feature of the API.

Remaining tasks

  • Refactor the API test case as described in the proposed resolution.

User interface changes

None.

API changes

None.

A patch will follow.

Comments

megachriz’s picture

Status: Active » Needs review
StatusFileSize
new19.41 KB

This patch splits the method testAddressBookApi() into multiple test methods. Additionally, it removes calls to t(). In some cases this is replaced with a call to format_string().

Status: Needs review » Needs work

The last submitted patch, uc_addresses7-refactor-api-test-1986800-1.patch, failed testing.

megachriz’s picture

Status: Needs work » Needs review
StatusFileSize
new20.47 KB

Forgot to include a file in the patch. There is an addition to UcAddressesTestCase made as well. New patch.

megachriz’s picture

Version: 7.x-1.x-dev » 6.x-2.x-dev
Status: Needs review » Patch (to be ported)

Committed #3.

Needs backport.

megachriz’s picture

Status: Patch (to be ported) » Needs review
StatusFileSize
new17.67 KB

Patch for the 6.x-2.x version. Note that not all t() calls have been replaced, because format_string() function is not available in Drupal 6.

megachriz’s picture

Version: 6.x-2.x-dev » 7.x-1.x-dev
Status: Needs review » Fixed

Committed #5.

Setting issue back to the version it was originally reported for and mark it as fixed.

Status: Fixed » Closed (fixed)

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