Migration1618900427FixTotalRounding example

$this->getContainer()->get('order.repository')
            ->create([$order], Context::createDefaultContext());

        $this->getContainer()->get(Connection::class)
            ->executeStatement('UPDATE `order` SET total_rounding = NULL WHERE id = :id', ['id' => $ids->getBytes('order')]);

        $rounding = $this->getContainer()->get(Connection::class)
            ->fetchOne('SELECT total_rounding FROM `order` WHERE id = :id', ['id' => $ids->getBytes('order')]);

        static::assertNull($rounding);

        $migration = new Migration1618900427FixTotalRounding();
        $migration->update($this->getContainer()->get(Connection::class));

        $rounding = $this->getContainer()->get(Connection::class)
            ->fetchOne('SELECT total_rounding FROM `order` WHERE id = :id', ['id' => $ids->getBytes('order')]);

        static::assertNotNull($rounding);
    }

    private function getStateId(): string
    {
        return $this->getContainer()->get(Connection::class)
            
Home | Imprint | This part of the site doesn't use cookies.