Product() public method

Get related product - live version if in cart, or - historical version if order is placed
public Product ( boolean $forcecurrent = false ) : Product
$forcecurrent boolean - force getting latest version of the product.
return Product
 /**
  * Tries to create an order item with a non-existent version.
  */
 public function testProductVersionDoesNotExist()
 {
     $brokenitem = new Product_OrderItem(array("ProductID" => $this->socks->ID, "ProductVersion" => 99999));
     $this->assertNull($brokenitem->Product(), "version does not exist");
 }