test fixes product category variatns - trying to show attribute type id which isnt valid field on that table

This commit is contained in:
2025-09-01 00:10:07 -07:00
parent 9636cc9091
commit 155095c25c
3 changed files with 10 additions and 11 deletions

View File

@@ -3,9 +3,9 @@ declare(strict_types=1);
namespace CakeProducts\Test\TestCase\Controller;
use Cake\ORM\Table;
use CakeProducts\Controller\ProductCategoryVariantsController;
use Cake\TestSuite\IntegrationTestTrait;
use Cake\TestSuite\TestCase;
use CakeProducts\Model\Table\ProductCategoryAttributesTable;
use CakeProducts\Model\Table\ProductCategoryVariantOptionsTable;
use CakeProducts\Model\Table\ProductCategoryVariantsTable;
use PHPUnit\Exception;
@@ -51,8 +51,11 @@ class ProductCategoryVariantsControllerTest extends BaseControllerTest
protected function setUp(): void
{
parent::setUp();
$this->ProductCategoryVariants = $this->getTableLocator()->get('ProductCategoryVariants');
$this->ProductCategoryVariantOptions = $this->getTableLocator()->get('ProductCategoryVariantOptions');
$config = $this->getTableLocator()->exists('ProductCategoryVariants') ? [] : ['className' => ProductCategoryVariantsTable::class];
$this->ProductCategoryVariants = $this->getTableLocator()->get('ProductCategoryVariants', $config);
$config = $this->getTableLocator()->exists('ProductCategoryVariantOptions') ? [] : ['className' => ProductCategoryVariantOptionsTable::class];
$this->ProductCategoryVariantOptions = $this->getTableLocator()->get('ProductCategoryVariantOptions', $config);
}
/**