public function CommerceNodeCheckoutExpireTests::relistNode in Commerce Node Checkout 7
Relist a given node and optionally checkout as well.
Parameters
$node: The node to relist and optionally purchase.
1 call to CommerceNodeCheckoutExpireTests::relistNode()
- CommerceNodeCheckoutExpireTests::testCommerceNodeCheckoutExpire in commerce_node_checkout_expire/
commerce_node_checkout_expire.test - Test everything we need to do with content, expiration, notifications, etc.
File
- commerce_node_checkout_expire/
commerce_node_checkout_expire.test, line 76 - Provides tests for Commerce Node Checkout Expire process.
Class
- CommerceNodeCheckoutExpireTests
- Test class.
Code
public function relistNode($node, $checkout = TRUE) {
$this
->drupalGet("node/{$node->nid}/relist");
$this
->assertRaw('Add to cart', 'Relist form has been loaded');
$this
->drupalPost(NULL, array(), t('Add to cart'));
// Checkout to relist the node
if ($checkout) {
$this
->checkout();
}
}