first commit

This commit is contained in:
2025-08-02 16:30:27 +02:00
commit 23646bfcee
14851 changed files with 1750626 additions and 0 deletions

View File

@@ -0,0 +1,39 @@
<?php
class OrderBugsTest extends DatabaseTestCase
{
use \KupShop\DevelopmentBundle\Util\Tests\CartTestTrait;
public function testBug6320()
{
global $dbcfg;
$dbcfg->currencies['CZK']['value'] = 1;
$user = User::createFromId(2);
$this->getContextManager()->activateUser($user, function () {
$this->createCart();
$this->cart->createFromDB();
$this->cart->delivery['name'] = 'test';
$this->cart->delivery['surname'] = 'test';
$this->cart->delivery['firm'] = null; // Caused delivery_firm cannot be null in INSERT
unset($this->cart->delivery['city']); // Caused undefined index in submitOrder
$this->assertInstanceOf('Order', $this->cart->submitOrder());
});
}
public function testChangeDeliveryInEurOrder()
{
$order = new Order();
$order->createFromDB(115700);
$order->changeDeliveryType(3);
$this->assertEquals('16.85', $order->total_price->asFloat());
}
public function getDataSet()
{
return $this->getJsonDataSetFromFile();
}
}