File tree Expand file tree Collapse file tree 1 file changed +15
-2
lines changed
lib/internal/Magento/Framework/Indexer/Test/Unit/Config Expand file tree Collapse file tree 1 file changed +15
-2
lines changed Original file line number Diff line number Diff line change 9
9
10
10
use Magento \Framework \Exception \ConfigurationMismatchException ;
11
11
use Magento \Framework \Indexer \Config \Converter ;
12
+ use Magento \Framework \Indexer \Config \Converter \SortingAdjustmentInterface ;
12
13
use PHPUnit \Framework \MockObject \MockObject ;
13
14
use PHPUnit \Framework \TestCase ;
14
15
15
16
class ConverterTest extends TestCase
16
17
{
17
18
/**
18
- * @var Converter|MockObject
19
+ * @var Converter
19
20
*/
20
21
protected $ _model ;
21
22
23
+ /**
24
+ * @var SortingAdjustmentInterface|MockObject
25
+ */
26
+ private $ sortingAdjustment ;
27
+
22
28
protected function setUp (): void
23
29
{
24
- $ this ->_model = new Converter ();
30
+ $ this ->sortingAdjustment = $ this ->getMockBuilder (SortingAdjustmentInterface::class)
31
+ ->getMockForAbstractClass ();
32
+ $ this ->sortingAdjustment ->method ("adjust " )->will (
33
+ $ this ->returnCallback (function ($ arg ) {
34
+ return $ arg ;
35
+ })
36
+ );
37
+ $ this ->_model = new Converter ($ this ->sortingAdjustment );
25
38
}
26
39
27
40
public function testConvert ()
You can’t perform that action at this time.
0 commit comments