File tree Expand file tree Collapse file tree 1 file changed +0
-58
lines changed
app/code/Magento/CatalogSearch/Test/Unit/Model/Resource Expand file tree Collapse file tree 1 file changed +0
-58
lines changed Original file line number Diff line number Diff line change @@ -49,64 +49,6 @@ protected function setUp()
49
49
);
50
50
}
51
51
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
-
110
52
/**
111
53
* @param null|string $expected
112
54
* @param array $data
You can’t perform that action at this time.
0 commit comments