本文整理汇总了PHP中SC_Helper_Purchase::cleanupSession方法的典型用法代码示例。如果您正苦于以下问题:PHP SC_Helper_Purchase::cleanupSession方法的具体用法?PHP SC_Helper_Purchase::cleanupSession怎么用?PHP SC_Helper_Purchase::cleanupSession使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类SC_Helper_Purchase
的用法示例。
在下文中一共展示了SC_Helper_Purchase::cleanupSession方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: array
public function testCleanupSession__カートとセッションの配送情報が削除される()
{
// 引数の準備
$helper = new SC_Helper_Purchase();
$cartSession = new SC_CartSession();
$customer = new SC_Customer();
// 削除前のデータを設定
$cartSession->addProduct('1001', 5);
// product_type_id=1
$cartSession->addProduct('1002', 10);
// product_type_id=2
$_SESSION['site']['uniqid'] = '100001';
$helper->cleanupSession('1001', $cartSession, $customer, '1');
$this->expected = array('cart_max_deleted' => 0, 'cart_max_notdeleted' => 1, 'uniqid' => '', 'shipping' => null, 'multiple_temp' => null);
$this->actual['cart_max_deleted'] = $cartSession->getMax('1');
$this->actual['cart_max_notdeleted'] = $cartSession->getMax('2');
$this->actual['uniqid'] = $_SESSION['site']['uniqid'];
$this->actual['shipping'] = $_SESSION['shipping'];
$this->actual['multiple_temp'] = $_SESSION['multiple_temp'];
$this->verify();
}