This is the beginnings of a core ubercart checkout test. Currently it tests basic checkout, however it should be easily extensible to test shipping methods, payment methods, attributes, etc.
| Comment | File | Size | Author |
|---|---|---|---|
| #3 | uc_cart_test_441878_3.patch | 12.35 KB | mikejoconnor |
| #2 | uc_cart_test_441878#3.patch | 12.35 KB | mikejoconnor |
| #1 | uc_cart.test.patch | 12.33 KB | mikejoconnor |
| uc_cart.test.patch | 6.41 KB | mikejoconnor |
Comments
Comment #1
mikejoconnor commentedHere is another version, which also tests some of the configuration settings.
Comment #2
mikejoconnor commentedA new version, updated for changes in the simpletest module.
Comment #3
mikejoconnor commentedwithout the #
Comment #4
Island Usurper commentedAll tests pass. Hooray for test coverage! Committed.
Comment #5
rszrama commentedSo... don't ya suppose this should be reviewed for general architecture as well? : )
For example, it seems the UbercartTestCase would be more appropriate in a general uc_store.test instead of in the cart module. Also, should a simulated checkout be in the UbercartTestCase as opposed to in a .test file specific to the cart module?
Sweet action, though.
Comment #6
Island Usurper commentedI did think about that, but I figured that uc_cart depends on all of the rest of the core Ubercart modules, so if it's enabled, then the basic functionality of a store is available. If UbercartTestCase is going to have a checkout() method, I think it makes sense for it to live in uc_cart. Then again, since DrupalWebTestCase::setUp() lets you enable any module, it might not matter too much.
Comment #7
Island Usurper commented