Eccube\Tests\Service\ShoppingServiceTest::testIsOrderProductWithSaleLimit PHP Method

testIsOrderProductWithSaleLimit() public method

    public function testIsOrderProductWithSaleLimit()
    {
        $Order = $this->createOrder($this->Customer);
        $Disp = $this->app['eccube.repository.master.disp']->find(\Eccube\Entity\Master\Disp::DISPLAY_SHOW);
        foreach ($Order->getOrderDetails() as $Detail) {
            $Detail->getProduct()->setStatus($Disp);
        }
        // 販売制限1, 注文数量2 に設定
        foreach ($Order->getOrderDetails() as $Detail) {
            $Detail->getProductClass()->setSaleLimit(1);
            $Detail->setQuantity(2);
            break;
        }
        $this->app['orm.em']->flush();
        $this->expected = false;
        $this->actual = $this->app['eccube.service.shopping']->isOrderProduct($this->app['orm.em'], $Order);
        $this->verify();
    }