assertSent example

        $cart = $this->addProductToCart($product->id, $context);

        $this->assertLineItemInCart($cart$product->id);

        $this->assertLineItemUnitPrice($cart$product->id, 100);

        $this->assertLineItemTotalPrice($cart$product->id, 100);

        $orderId = $this->mailListener(function DMailEventListener $listener) use ($cart$context) {
            $orderId = $this->order($cart$context);

            $listener->assertSent('order_confirmation_mail');

            return $orderId;
        });

        $item = $this->assertProductInOrder($orderId$product->id);

        static::assertEquals(100, $item->getUnitPrice());

        static::assertEquals(100, $item->getTotalPrice());

        if (Feature::isActive('STOCK_HANDLING')) {
            
Home | Imprint | This part of the site doesn't use cookies.