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.
Related Issues
A patch will follow.
| Comment | File | Size | Author |
|---|---|---|---|
| #5 | uc_addresses6-refactor-api-test-1986800-5.patch | 17.67 KB | megachriz |
| #3 | uc_addresses7-refactor-api-test-1986800-3.patch | 20.47 KB | megachriz |
| #1 | uc_addresses7-refactor-api-test-1986800-1.patch | 19.41 KB | megachriz |
Comments
Comment #1
megachrizThis patch splits the method testAddressBookApi() into multiple test methods. Additionally, it removes calls to
t(). In some cases this is replaced with a call toformat_string().Comment #3
megachrizForgot to include a file in the patch. There is an addition to UcAddressesTestCase made as well. New patch.
Comment #4
megachrizCommitted #3.
Needs backport.
Comment #5
megachrizPatch for the 6.x-2.x version. Note that not all
t()calls have been replaced, becauseformat_string()function is not available in Drupal 6.Comment #6
megachrizCommitted #5.
Setting issue back to the version it was originally reported for and mark it as fixed.