product variants table split off from category variants table, variant values table updated to reflect
This commit is contained in:
@@ -37,6 +37,7 @@ class ProductCategoryVariantsControllerTest extends BaseControllerTest
|
||||
*/
|
||||
protected array $fixtures = [
|
||||
'plugin.CakeProducts.ProductCategoryVariants',
|
||||
'plugin.CakeProducts.ProductVariants',
|
||||
'plugin.CakeProducts.ProductCategories',
|
||||
'plugin.CakeProducts.Products',
|
||||
'plugin.CakeProducts.ProductSkus',
|
||||
@@ -51,6 +52,8 @@ class ProductCategoryVariantsControllerTest extends BaseControllerTest
|
||||
protected function setUp(): void
|
||||
{
|
||||
parent::setUp();
|
||||
$this->disableErrorHandlerMiddleware();
|
||||
|
||||
$config = $this->getTableLocator()->exists('ProductCategoryVariants') ? [] : ['className' => ProductCategoryVariantsTable::class];
|
||||
$this->ProductCategoryVariants = $this->getTableLocator()->get('ProductCategoryVariants', $config);
|
||||
|
||||
|
||||
@@ -42,6 +42,10 @@ class ProductSkusControllerTest extends BaseControllerTest
|
||||
'plugin.CakeProducts.ProductSkus',
|
||||
'plugin.CakeProducts.Products',
|
||||
'plugin.CakeProducts.ProductAttributes',
|
||||
'plugin.CakeProducts.ProductVariants',
|
||||
'plugin.CakeProducts.ProductCategoryVariants',
|
||||
'plugin.CakeProducts.ProductCategoryVariantOptions',
|
||||
'plugin.CakeProducts.ProductSkuVariantValues',
|
||||
];
|
||||
|
||||
/**
|
||||
@@ -173,15 +177,14 @@ class ProductSkusControllerTest extends BaseControllerTest
|
||||
];
|
||||
$data = [
|
||||
0 => [
|
||||
'add' => '1',
|
||||
'sku' => 'cfc98a9a-29b2-44c8-b587-8156a',
|
||||
'barcode' => 'cfc98a9a-29b2-44c8-b587-8156a',
|
||||
'price' => 1.5,
|
||||
'cost' => 1.5,
|
||||
'product_sku_variant_values' => [
|
||||
0 => [
|
||||
'product_category_variant_id' => '5a386e9f-6e7a-4ae7-9360-c8e529f78d93',
|
||||
'product_category_variant_option_id' => '5a386e9f-6e7a-4ae7-9360-c8e529f78d26',
|
||||
'product_variant_id' => '2e6e4031-c430-4d07-b8d6-a4e759b72568',
|
||||
'product_category_variant_option_id' => '5a386e9f-6e7a-4ae7-9360-c8e529f78d23',
|
||||
],
|
||||
],
|
||||
],
|
||||
|
||||
Reference in New Issue
Block a user