test fixes product category variatns - trying to show attribute type id which isnt valid field on that table
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user