Skip to content
This repository has been archived by the owner on Jun 11, 2024. It is now read-only.

Commit

Permalink
Merge pull request #322 from DivanteLtd/bugfix/fix-unit-tests
Browse files Browse the repository at this point in the history
Fix unit tests.
  • Loading branch information
afirlejczyk authored Jul 31, 2020
2 parents ad295fb + e8fab6d commit eb4668b
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

namespace Divante\VsbridgeIndexerCatalog\Test\Model\Attributes;

use Divante\VsbridgeIndexerCatalog\Model\Attributes\CategoryAttributes;
use Divante\VsbridgeIndexerCatalog\Model\Attributes\CategoryChildAttributes;
use Divante\VsbridgeIndexerCatalog\Model\SystemConfig\CategoryConfigInterface;
use Magento\Framework\TestFramework\Unit\Helper\ObjectManager;
Expand Down Expand Up @@ -47,7 +48,7 @@ protected function setUp()
*/
public function testGetChildrenRequiredAttributes(int $storeId, array $selectedAttributes)
{
$attributes = CategoryChildAttributes::MINIMAL_ATTRIBUTE_SET;
$attributes = CategoryAttributes::MINIMAL_ATTRIBUTE_SET;

$this->catalogConfigMock->expects($this->once())
->method('getAllowedChildAttributesToIndex')
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<?php

use Divante\VsbridgeIndexerCore\Api\Client\ClientInterface;
use Divante\VsbridgeIndexerCore\Config\OptimizationSettings;
use Divante\VsbridgeIndexerCore\Index\IndexOperations;
use Divante\VsbridgeIndexerCore\Index\IndexSettings;
use Divante\VsbridgeIndexerCore\Api\BulkResponseInterfaceFactory as BulkResponseFactory;
Expand Down Expand Up @@ -54,6 +55,9 @@ class IndexOperationsTest extends TestCase
/** @var PHPUnit_Framework_MockObject_MockObject */
private $clientMock;

/** @var OptimizationSettings|PHPUnit_Framework_MockObject_MockObject */
private $optimizationSettingsMock;

/** @var array[][] */
private $indicesXmlConfiguration = [
'vue' => [
Expand Down Expand Up @@ -92,12 +96,17 @@ protected function setUp()
->disableOriginalConstructor()
->getMock();

$this->optimizationSettingsMock = $this->getMockBuilder(OptimizationSettings::class)
->disableOriginalConstructor()
->getMock();

$this->indexOperations = new IndexOperations(
$this->clientResolverMock,
$this->bulkResponseFactoryMock,
$this->bulkRequestFactoryMock,
$this->esIndexSettingsMock,
$this->indexFactoryMock
$this->indexFactoryMock,
$this->optimizationSettingsMock
);
}

Expand Down

0 comments on commit eb4668b

Please sign in to comment.