get product skus table via product photos in product photos controller
This commit is contained in:
@@ -7,6 +7,7 @@ use Cake\Core\Configure;
|
||||
use Cake\ORM\Table;
|
||||
use CakeProducts\Controller\ProductPhotosController;
|
||||
use CakeProducts\Model\Table\ProductPhotosTable;
|
||||
use CakeProducts\Model\Table\ProductsTable;
|
||||
use FilesystemIterator;
|
||||
use Laminas\Diactoros\UploadedFile;
|
||||
use PHPUnit\Exception;
|
||||
@@ -47,7 +48,8 @@ class ProductPhotosControllerTest extends BaseControllerTest
|
||||
protected function setUp(): void
|
||||
{
|
||||
parent::setUp();
|
||||
$this->ProductPhotos = $this->getTableLocator()->get('ProductPhotos');
|
||||
$config = $this->getTableLocator()->exists('ProductPhotos') ? [] : ['className' => ProductPhotosTable::class];
|
||||
$this->ProductPhotos = $this->getTableLocator()->get('ProductPhotos', $config);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user