submitOrder example

'config' => [
                        'tagIds' => [
                            $this->ids->get('tag_id3') => 'test tag3',
                        ],
                    ],
                    'position' => 1,
                    'trueCase' => true,
                ],
            ],
        ]], Context::createDefaultContext());

        $this->submitOrder();

        $orderTag = $this->connection->fetchAllAssociative(
            'SELECT tag_id FROM order_tag WHERE tag_id IN (:ids)',
            ['ids' => [Uuid::fromHexToBytes($this->ids->get('tag_id')), Uuid::fromHexToBytes($this->ids->get('tag_id2')), Uuid::fromHexToBytes($this->ids->get('tag_id3'))]],
            ['ids' => ArrayParameterType::STRING]
        );

        static::assertCount(3, $orderTag);
    }

    public function testAddOrderTagActionWithDuplicateTag(): void
    {
$this->browser->setServerParameter('HTTP_SW_CONTEXT_TOKEN', $this->ids->create('token'));
    }

    public function testSetAvailableOrderState(): void
    {
        $orderState = 'cancelled';
        $orderDeliveryState = 'cancelled';
        $orderTransactionState = 'cancelled';
        $this->prepareFlowSequences($orderState$orderDeliveryState$orderTransactionState);
        $this->prepareProductTest();
        $this->createCustomerAndLogin();
        $this->submitOrder();

        $orderId = $this->getOrderId();
        $orderStateAfterAction = $this->getOrderState($orderId);
        static::assertSame($orderState$orderStateAfterAction);

        $orderDeliveryStateAfterAction = $this->getOderDeliveryState($orderId);
        static::assertSame($orderDeliveryState$orderDeliveryStateAfterAction);

        $orderTransactionStateAfterAction = $this->getOrderTransactionState($orderId);
        static::assertSame($orderTransactionState$orderTransactionStateAfterAction);
    }

    

            ],
        ]], Context::createDefaultContext());

        $orderTag = $this->connection->fetchAllAssociative(
            'SELECT lower(hex(tag_id)) FROM order_tag WHERE order_id = (:orderId)',
            ['orderId' => Uuid::fromHexToBytes($orderId)]
        );

        static::assertCount(2, $orderTag);

        $this->submitOrder();

        $orderTag = $this->connection->fetchAllAssociative(
            'SELECT * FROM order_tag WHERE order_id = (:orderId)',
            ['orderId' => Uuid::fromHexToBytes($this->ids->get('tag_id'))]
        );

        static::assertCount(0, $orderTag);
    }

    private function createDataTest(): void
    {
        
Home | Imprint | This part of the site doesn't use cookies.