@@ -90,17 +90,20 @@ public function testExecute()
90
90
$ attributeId = 15 ;
91
91
$ conditions = ['first ' , 'second ' ];
92
92
93
- $ this ->scopeConfigMock ->expects ($ this ->once ())->method ('getValue ' )->with (Store::XML_PATH_PRICE_SCOPE )
93
+ $ this ->scopeConfigMock
94
+ ->expects ($ this ->once ())
95
+ ->method ('getValue ' )
96
+ ->with (Store::XML_PATH_PRICE_SCOPE )
94
97
->willReturn (Store::XML_PATH_PRICE_SCOPE );
95
- $ this ->attributeRepositoryMock ->expects ($ this ->once ())->method ('get ' )
98
+ $ this ->attributeRepositoryMock
99
+ ->expects ($ this ->once ())
100
+ ->method ('get ' )
96
101
->with (ProductAttributeInterface::ENTITY_TYPE_CODE , ProductAttributeInterface::CODE_PRICE )
97
102
->willReturn ($ this ->attributeMock );
98
103
$ this ->attributeMock ->expects ($ this ->once ())->method ('getId ' )->willReturn ($ attributeId );
99
104
$ this ->attributeMock ->expects ($ this ->once ())->method ('getBackend ' )->willReturn ($ this ->attributeBackendMock );
100
105
$ this ->attributeBackendMock ->expects ($ this ->once ())->method ('getTable ' )->willReturn ($ table );
101
- $ this ->resourceConnectionMock ->expects ($ this ->once ())
102
- ->method ('getConnection ' )
103
- ->willReturn ($ this ->dbAdapterMock );
106
+ $ this ->resourceConnectionMock ->expects ($ this ->once ())->method ('getConnection ' )->willReturn ($ this ->dbAdapterMock );
104
107
$ this ->dbAdapterMock ->expects ($ this ->exactly (2 ))->method ('quoteInto ' )->willReturnMap ([
105
108
['attribute_id = ? ' , $ attributeId , null , null , $ conditions [0 ]],
106
109
['store_id != ? ' , Store::DEFAULT_STORE_ID , null , null , $ conditions [1 ]],
@@ -117,10 +120,17 @@ public function testExecute()
117
120
*/
118
121
public function testExecutePriceConfigIsNotSetToGlobal ()
119
122
{
120
- $ this ->scopeConfigMock ->expects ($ this ->once ())->method ('getValue ' )->with (Store::XML_PATH_PRICE_SCOPE )
123
+ $ this ->scopeConfigMock
124
+ ->expects ($ this ->once ())
125
+ ->method ('getValue ' )
126
+ ->with (Store::XML_PATH_PRICE_SCOPE )
121
127
->willReturn (null );
122
- $ this ->attributeRepositoryMock ->expects ($ this ->never ())->method ('get ' );
123
- $ this ->dbAdapterMock ->expects ($ this ->never ())->method ('delete ' );
128
+ $ this ->attributeRepositoryMock
129
+ ->expects ($ this ->never ())
130
+ ->method ('get ' );
131
+ $ this ->dbAdapterMock
132
+ ->expects ($ this ->never ())
133
+ ->method ('delete ' );
124
134
125
135
$ this ->deleteOutdatedPriceValues ->execute ();
126
136
}
0 commit comments