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.

Comments

mikejoconnor’s picture

StatusFileSize
new12.33 KB

Here is another version, which also tests some of the configuration settings.

mikejoconnor’s picture

StatusFileSize
new12.35 KB

A new version, updated for changes in the simpletest module.

mikejoconnor’s picture

StatusFileSize
new12.35 KB

without the #

Island Usurper’s picture

Status: Needs review » Fixed

All tests pass. Hooray for test coverage! Committed.

rszrama’s picture

Status: Fixed » Needs review

So... 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.

Island Usurper’s picture

I 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.

Island Usurper’s picture

Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

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