10
10
11
11
/**
12
12
* @SuppressWarnings(PHPMD.CouplingBetweenObjects)
13
- */
13
+ */
14
14
class RowTest extends \PHPUnit \Framework \TestCase
15
15
{
16
16
/**
@@ -75,7 +75,9 @@ protected function setUp()
75
75
$ this ->storeManager ->expects ($ this ->any ())->method ('getStores ' )->will ($ this ->returnValue ([$ this ->store ]));
76
76
$ this ->flatItemEraser = $ this ->createMock (\Magento \Catalog \Model \Indexer \Product \Flat \Action \Eraser::class);
77
77
$ this ->flatItemWriter = $ this ->createMock (\Magento \Catalog \Model \Indexer \Product \Flat \Action \Indexer::class);
78
- $ this ->flatTableBuilder = $ this ->createMock (\Magento \Catalog \Model \Indexer \Product \Flat \FlatTableBuilder::class);
78
+ $ this ->flatTableBuilder = $ this ->createMock (
79
+ \Magento \Catalog \Model \Indexer \Product \Flat \FlatTableBuilder::class
80
+ );
79
81
$ this ->productIndexerHelper = $ this ->createMock (\Magento \Catalog \Helper \Product \Flat \Indexer::class);
80
82
$ statusAttributeMock = $ this ->getMockBuilder (\Magento \Eav \Model \Entity \Attribute::class)
81
83
->disableOriginalConstructor ()
@@ -101,18 +103,23 @@ protected function setUp()
101
103
)->willReturnSelf ();
102
104
$ selectMock ->expects ($ this ->any ())->method ('where ' )->willReturnSelf ();
103
105
$ pdoMock = $ this ->createMock (\Zend_Db_Statement_Pdo::class);
104
- $ this ->connection ->expects ($ this ->any ())->method ('query ' )->with ($ selectMock )->will ($ this ->returnValue ($ pdoMock ));
106
+ $ this ->connection ->expects ($ this ->any ())
107
+ ->method ('query ' )
108
+ ->with ($ selectMock )
109
+ ->will ($ this ->returnValue ($ pdoMock ));
105
110
$ pdoMock ->expects ($ this ->any ())->method ('fetch ' )->will ($ this ->returnValue (['value ' => 1 ]));
106
111
107
112
$ this ->model = $ objectManager ->getObject (
108
- \Magento \Catalog \Model \Indexer \Product \Flat \Action \Row::class, [
109
- 'resource ' => $ this ->resource ,
110
- 'storeManager ' => $ this ->storeManager ,
111
- 'productHelper ' => $ this ->productIndexerHelper ,
112
- 'flatItemEraser ' => $ this ->flatItemEraser ,
113
- 'flatItemWriter ' => $ this ->flatItemWriter ,
114
- 'flatTableBuilder ' => $ this ->flatTableBuilder ,
115
- ]);
113
+ \Magento \Catalog \Model \Indexer \Product \Flat \Action \Row::class,
114
+ [
115
+ 'resource ' => $ this ->resource ,
116
+ 'storeManager ' => $ this ->storeManager ,
117
+ 'productHelper ' => $ this ->productIndexerHelper ,
118
+ 'flatItemEraser ' => $ this ->flatItemEraser ,
119
+ 'flatItemWriter ' => $ this ->flatItemWriter ,
120
+ 'flatTableBuilder ' => $ this ->flatTableBuilder
121
+ ]
122
+ );
116
123
}
117
124
118
125
/**
0 commit comments