You are here

public function CommerceNodeCheckoutExpireTests::getNodeExpiration in Commerce Node Checkout 7

Get a node's expiration date, if one is set.

Parameters

$node: The node object.

Return value

The timestamp of expiration, otherwise NULL if not set.

1 call to CommerceNodeCheckoutExpireTests::getNodeExpiration()
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 61
Provides tests for Commerce Node Checkout Expire process.

Class

CommerceNodeCheckoutExpireTests
Test class.

Code

public function getNodeExpiration($node) {

  // Make sure we don't get old data
  drupal_static_reset('commerce_node_checkout_expire_get_node_last_line_item');
  entity_get_controller('commerce_line_item')
    ->resetCache();

  // Get the expiration date
  return commerce_node_checkout_expire_get_node_expiration($node);
}