Skip to content

Commit d54a53f

Browse files
committed
MAGETWO-36982: Create Search Module API to support search functionality.
- MAGETWO-39542: Implement Product::search method - Removed test testSave in EngineTest
1 parent e55834f commit d54a53f

File tree

1 file changed

+0
-58
lines changed

1 file changed

+0
-58
lines changed

app/code/Magento/CatalogSearch/Test/Unit/Model/Resource/EngineTest.php

Lines changed: 0 additions & 58 deletions
Original file line numberDiff line numberDiff line change
@@ -49,64 +49,6 @@ protected function setUp()
4949
);
5050
}
5151

52-
/**
53-
* @dataProvider saveDataProvider
54-
*/
55-
public function testSaveIndex($storeId, $entityIndexes, $expected)
56-
{
57-
$dimension = $this->getMockBuilder('\Magento\Framework\Search\Request\Dimension')
58-
->disableOriginalConstructor()
59-
->setMethods(['getName', 'getValue'])
60-
->getMock();
61-
$dimension->expects($this->any())->method('getName')->willReturn('scope');
62-
$dimension->expects($this->any())->method('getValue')->willReturn($storeId);
63-
if ($expected) {
64-
$this->connection->expects($this->once())
65-
->method('insertOnDuplicate')
66-
->with(null, $expected, ['data_index'])
67-
->willReturnSelf();
68-
}
69-
$this->target->saveIndex([$dimension], $entityIndexes);
70-
}
71-
72-
public function saveDataProvider()
73-
{
74-
return [
75-
'empty' => [
76-
null,
77-
new \ArrayIterator([]),
78-
[]
79-
],
80-
'correctData' => [
81-
13,
82-
new \ArrayIterator([
83-
28 => [
84-
123 => 'Value of 123',
85-
845 => 'Value of 845',
86-
'options' => 'Some | Index | Value'
87-
]
88-
]),
89-
[
90-
[
91-
'product_id' => 28,
92-
'attribute_id' => 123,
93-
'data_index' => 'Value of 123'
94-
],
95-
[
96-
'product_id' => 28,
97-
'attribute_id' => 845,
98-
'data_index' => 'Value of 845'
99-
],
100-
[
101-
'product_id' => 28,
102-
'attribute_id' => 0,
103-
'data_index' => 'Some | Index | Value'
104-
]
105-
]
106-
]
107-
];
108-
}
109-
11052
/**
11153
* @param null|string $expected
11254
* @param array $data

0 commit comments

Comments
 (0)