uuids instead of int ids fore xternal product catalogs, test fixes, many to many working now

This commit is contained in:
2025-03-31 01:30:09 -07:00
parent 4c65d23e2b
commit 025017537f
11 changed files with 43 additions and 31 deletions

View File

@@ -3,6 +3,7 @@ declare(strict_types=1);
namespace CakeProducts\Test\TestCase\Model\Table;
use Cake\ORM\Table;
use Cake\TestSuite\TestCase;
use CakeProducts\Model\Table\ExternalProductCatalogsTable;
@@ -14,7 +15,7 @@ class ExternalProductCatalogsTableTest extends TestCase
/**
* Test subject
*
* @var \CakeProducts\Model\Table\ExternalProductCatalogsTable
* @var ExternalProductCatalogsTable
*/
protected $ExternalProductCatalogs;
@@ -25,6 +26,7 @@ class ExternalProductCatalogsTableTest extends TestCase
*/
protected array $fixtures = [
'plugin.CakeProducts.ExternalProductCatalogs',
'plugin.CakeProducts.ExternalProductCatalogsProductCatalogs',
'plugin.CakeProducts.ProductCatalogs',
];
@@ -56,13 +58,14 @@ class ExternalProductCatalogsTableTest extends TestCase
* TestInitialize method
*
* @return void
* @uses \CakeProducts\Model\Table\ExternalProductCatalogsTable::initialize()
* @uses ExternalProductCatalogsTable::initialize
*/
public function testInitialize(): void
{
// verify all associations loaded
$expectedAssociations = [
'ProductCatalogs',
'ExternalProductCatalogsProductCatalogs',
];
$associations = $this->ExternalProductCatalogs->associations();
@@ -87,7 +90,7 @@ class ExternalProductCatalogsTableTest extends TestCase
* Test validationDefault method
*
* @return void
* @uses \CakeProducts\Model\Table\ExternalProductCatalogsTable::validationDefault()
* @uses ExternalProductCatalogsTable::validationDefault
*/
public function testValidationDefault(): void
{
@@ -98,7 +101,7 @@ class ExternalProductCatalogsTableTest extends TestCase
* Test buildRules method
*
* @return void
* @uses \CakeProducts\Model\Table\ExternalProductCatalogsTable::buildRules()
* @uses ExternalProductCatalogsTable::buildRules
*/
public function testBuildRules(): void
{

View File

@@ -26,6 +26,7 @@ class ProductCatalogsTableTest extends TestCase
*/
protected array $fixtures = [
'plugin.CakeProducts.ProductCatalogs',
'plugin.CakeProducts.ExternalProductCatalogsProductCatalogs',
'plugin.CakeProducts.ProductCategories',
];