Skip to content

Commit b0526bb

Browse files
committed
ACP2E-3345: Type Error occurred when creating object: Magento\CatalogSearch\Model\Indexer\Fulltext\Interceptor Exception
1 parent 581b7ef commit b0526bb

File tree

2 files changed

+30
-1
lines changed

2 files changed

+30
-1
lines changed

app/code/Magento/CatalogSearch/Model/Indexer/Fulltext.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ public function __construct(
123123
IndexSwitcherInterface $indexSwitcher,
124124
StateFactory $indexScopeStateFactory,
125125
DimensionProviderInterface $dimensionProvider,
126-
array $data,
126+
array $data = [],
127127
ProcessManager $processManager = null,
128128
?int $batchSize = null,
129129
?DeploymentConfig $deploymentConfig = null
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
<?php
2+
/**
3+
* Copyright 2024 Adobe
4+
* All Rights Reserved.
5+
*/
6+
declare(strict_types=1);
7+
8+
namespace Magento\CatalogSearch\Model\Indexer;
9+
10+
use Magento\TestFramework\Helper\Bootstrap;
11+
use PHPUnit\Framework\TestCase;
12+
13+
class FulltextFactoryTest extends TestCase
14+
{
15+
/**
16+
* @var FulltextFactory|null
17+
*/
18+
private ?FulltextFactory $fulltextFactory;
19+
20+
protected function setUp(): void
21+
{
22+
$this->fulltextFactory = Bootstrap::getObjectManager()->get(FulltextFactory::class);
23+
}
24+
25+
public function testCreate(): void
26+
{
27+
self::assertInstanceOf(Fulltext::class, $this->fulltextFactory->create());
28+
}
29+
}

0 commit comments

Comments
 (0)