27 lines
661 B
PHP
27 lines
661 B
PHP
<?php
|
|
|
|
namespace KupShop\CatalogBundle\Tests;
|
|
|
|
use KupShop\KupShopBundle\Util\Compat\ServiceContainer;
|
|
use KupShop\MarginsBundle\Compute;
|
|
|
|
class MarginsTest extends \DatabaseTestCase
|
|
{
|
|
public function testMarginsCompute()
|
|
{
|
|
/** @var Compute\Compute $service */
|
|
$service = ServiceContainer::getService('kupshop.margins.compute.compute');
|
|
$service->computeAll();
|
|
|
|
$product = new \Product();
|
|
$product->createFromDB(123);
|
|
|
|
$this->assertEquals('1200', $product->price_array['value_without_vat']->asFloat());
|
|
}
|
|
|
|
public function getDataSet()
|
|
{
|
|
return $this->getJsonDataSetFromFile();
|
|
}
|
|
}
|