bring into standalone plugin for distribution
This commit is contained in:
33
tests/Fixture/ExternalProductCatalogsFixture.php
Normal file
33
tests/Fixture/ExternalProductCatalogsFixture.php
Normal file
@@ -0,0 +1,33 @@
|
||||
<?php
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace CakeProducts\Test\Fixture;
|
||||
|
||||
use Cake\TestSuite\Fixture\TestFixture;
|
||||
|
||||
/**
|
||||
* ExternalProductCatalogsFixture
|
||||
*/
|
||||
class ExternalProductCatalogsFixture extends TestFixture
|
||||
{
|
||||
/**
|
||||
* Init method
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function init(): void
|
||||
{
|
||||
$this->records = [
|
||||
[
|
||||
'id' => 1,
|
||||
'product_catalog_id' => '115153f3-2f59-4234-8ff8-e1b205761428',
|
||||
'base_url' => 'http://localhost:8766',
|
||||
'api_url' => 'http://localhost:8766/api',
|
||||
'created' => '2024-11-22 09:39:37',
|
||||
'deleted' => '2024-11-22 09:39:37',
|
||||
'enabled' => 1,
|
||||
],
|
||||
];
|
||||
parent::init();
|
||||
}
|
||||
}
|
||||
36
tests/Fixture/ProductCatalogsFixture.php
Normal file
36
tests/Fixture/ProductCatalogsFixture.php
Normal file
@@ -0,0 +1,36 @@
|
||||
<?php
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace CakeProducts\Test\Fixture;
|
||||
|
||||
use Cake\TestSuite\Fixture\TestFixture;
|
||||
|
||||
/**
|
||||
* ProductCatalogsFixture
|
||||
*/
|
||||
class ProductCatalogsFixture extends TestFixture
|
||||
{
|
||||
/**
|
||||
* Init method
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function init(): void
|
||||
{
|
||||
$this->records = [
|
||||
[
|
||||
'id' => '115153f3-2f59-4234-8ff8-e1b205761428',
|
||||
'name' => 'Automotive',
|
||||
'catalog_description' => '',
|
||||
'enabled' => true,
|
||||
],
|
||||
[
|
||||
'id' => 'f56f3412-ed23-490b-be6e-016208c415d2',
|
||||
'name' => 'Software',
|
||||
'catalog_description' => '',
|
||||
'enabled' => true,
|
||||
],
|
||||
];
|
||||
parent::init();
|
||||
}
|
||||
}
|
||||
101
tests/Fixture/ProductCategoriesFixture.php
Normal file
101
tests/Fixture/ProductCategoriesFixture.php
Normal file
@@ -0,0 +1,101 @@
|
||||
<?php
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace CakeProducts\Test\Fixture;
|
||||
|
||||
use Cake\TestSuite\Fixture\TestFixture;
|
||||
|
||||
/**
|
||||
* ProductCategoriesFixture
|
||||
*/
|
||||
class ProductCategoriesFixture extends TestFixture
|
||||
{
|
||||
/**
|
||||
* Init method
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function init(): void
|
||||
{
|
||||
$this->records = [
|
||||
[
|
||||
'id' => 1,
|
||||
'product_catalog_id' => '115153f3-2f59-4234-8ff8-e1b205761428',
|
||||
'internal_id' => 'db4b4273-eddc-46d4-93c8-45cf7c6e058e',
|
||||
'name' => 'Engine',
|
||||
'category_description' => '',
|
||||
'parent_id' => null,
|
||||
'lft' => 1,
|
||||
'rght' => 4,
|
||||
'enabled' => true,
|
||||
],
|
||||
[
|
||||
'id' => 2,
|
||||
'product_catalog_id' => '115153f3-2f59-4234-8ff8-e1b205761428',
|
||||
'internal_id' => '3c2377c5-b97c-4bc9-9660-8f77b4893d8b',
|
||||
'name' => 'Engine Internals',
|
||||
'category_description' => '',
|
||||
'parent_id' => 1,
|
||||
'lft' => 2,
|
||||
'rght' => 3,
|
||||
'enabled' => true,
|
||||
],
|
||||
[
|
||||
'id' => 3,
|
||||
'product_catalog_id' => '115153f3-2f59-4234-8ff8-e1b205761428',
|
||||
'internal_id' => 'fbee6709-396f-4bb4-b60b-e125b0bc4e83',
|
||||
'name' => 'Electrical',
|
||||
'category_description' => '',
|
||||
'parent_id' => null,
|
||||
'lft' => 5,
|
||||
'rght' => 8,
|
||||
'enabled' => true,
|
||||
],
|
||||
[
|
||||
'id' => 4,
|
||||
'product_catalog_id' => '115153f3-2f59-4234-8ff8-e1b205761428',
|
||||
'internal_id' => '6d223283-361b-4f9f-a7f1-c97aa0ca4c23',
|
||||
'name' => 'Wiring',
|
||||
'category_description' => '',
|
||||
'parent_id' => 3,
|
||||
'lft' => 6,
|
||||
'rght' => 7,
|
||||
'enabled' => true,
|
||||
],
|
||||
[
|
||||
'id' => 5,
|
||||
'product_catalog_id' => '115153f3-2f59-4234-8ff8-e1b205761428',
|
||||
'internal_id' => 'c447b6f4-0fb1-4d59-ba45-5613829a725a',
|
||||
'name' => 'Suspension',
|
||||
'category_description' => '',
|
||||
'parent_id' => null,
|
||||
'lft' => 9,
|
||||
'rght' => 12,
|
||||
'enabled' => true,
|
||||
],
|
||||
[
|
||||
'id' => 6,
|
||||
'product_catalog_id' => '115153f3-2f59-4234-8ff8-e1b205761428',
|
||||
'internal_id' => '1e749d3b-aee0-48a5-8d6c-8cf2b83e9b6e',
|
||||
'name' => 'Coilovers',
|
||||
'category_description' => '',
|
||||
'parent_id' => 5,
|
||||
'lft' => 10,
|
||||
'rght' => 11,
|
||||
'enabled' => true,
|
||||
],
|
||||
[
|
||||
'id' => 7,
|
||||
'product_catalog_id' => 'f56f3412-ed23-490b-be6e-016208c415d2',
|
||||
'internal_id' => '8c89a3ca-d56f-46bf-a738-7e85b3342b2a',
|
||||
'name' => 'Support',
|
||||
'category_description' => '',
|
||||
'parent_id' => null,
|
||||
'lft' => 1,
|
||||
'rght' => 2,
|
||||
'enabled' => true,
|
||||
],
|
||||
];
|
||||
parent::init();
|
||||
}
|
||||
}
|
||||
31
tests/Fixture/ProductCategoryAttributeOptionsFixture.php
Normal file
31
tests/Fixture/ProductCategoryAttributeOptionsFixture.php
Normal file
@@ -0,0 +1,31 @@
|
||||
<?php
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace CakeProducts\Test\Fixture;
|
||||
|
||||
use Cake\TestSuite\Fixture\TestFixture;
|
||||
|
||||
/**
|
||||
* ProductCategoryAttributeOptionsFixture
|
||||
*/
|
||||
class ProductCategoryAttributeOptionsFixture extends TestFixture
|
||||
{
|
||||
/**
|
||||
* Init method
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function init(): void
|
||||
{
|
||||
$this->records = [
|
||||
[
|
||||
'id' => 'e06f1723-2456-483a-b3c4-004603e032a8',
|
||||
'product_category_attribute_id' => '37078cf0-0130-4b93-bb7e-abe7d665ed2c',
|
||||
'attribute_value' => 'Lorem ipsum dolor sit amet',
|
||||
'attribute_label' => 'Lorem ipsum dolor sit amet',
|
||||
'enabled' => 1,
|
||||
],
|
||||
];
|
||||
parent::init();
|
||||
}
|
||||
}
|
||||
31
tests/Fixture/ProductCategoryAttributesFixture.php
Normal file
31
tests/Fixture/ProductCategoryAttributesFixture.php
Normal file
@@ -0,0 +1,31 @@
|
||||
<?php
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace CakeProducts\Test\Fixture;
|
||||
|
||||
use Cake\TestSuite\Fixture\TestFixture;
|
||||
|
||||
/**
|
||||
* ProductCategoryAttributesFixture
|
||||
*/
|
||||
class ProductCategoryAttributesFixture extends TestFixture
|
||||
{
|
||||
/**
|
||||
* Init method
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function init(): void
|
||||
{
|
||||
$this->records = [
|
||||
[
|
||||
'id' => '37078cf0-0130-4b93-bb7e-abe7d665ed2c',
|
||||
'name' => 'Color',
|
||||
'product_category_id' => '6d223283-361b-4f9f-a7f1-c97aa0ca4c23',
|
||||
'attribute_type_id' => 1,
|
||||
'enabled' => 1,
|
||||
],
|
||||
];
|
||||
parent::init();
|
||||
}
|
||||
}
|
||||
30
tests/Fixture/ProductsFixture.php
Normal file
30
tests/Fixture/ProductsFixture.php
Normal file
@@ -0,0 +1,30 @@
|
||||
<?php
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace CakeProducts\Test\Fixture;
|
||||
|
||||
use Cake\TestSuite\Fixture\TestFixture;
|
||||
|
||||
/**
|
||||
* ProductsFixture
|
||||
*/
|
||||
class ProductsFixture extends TestFixture
|
||||
{
|
||||
/**
|
||||
* Init method
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function init(): void
|
||||
{
|
||||
$this->records = [
|
||||
[
|
||||
'id' => 'cfc98a9a-29b2-44c8-b587-8156adc05317',
|
||||
'name' => '12AWG RED TXL Wire',
|
||||
'product_category_id' => '6d223283-361b-4f9f-a7f1-c97aa0ca4c23',
|
||||
'product_type_id' => 1,
|
||||
],
|
||||
];
|
||||
parent::init();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user