@@ -89,11 +89,11 @@ protected function setUp(): void
8989 public function testGetData ()
9090 {
9191 $ ruleId = 42 ;
92- $ ruleData = ['name ' => 'Sales Price Rule ' ];
92+ $ ruleData = ['name ' => 'Sales Price Rule ' , ' store_labels ' => [ ' 1 ' => ' Store Label ' ] ];
9393
9494 $ ruleMock = $ this ->getMockBuilder (Rule::class)
95- ->addMethods (['getDiscountAmount ' , 'setDiscountAmount ' , 'getDiscountQty ' , 'setDiscountQty ' ])
96- ->onlyMethods (['load ' , 'getId ' , 'getData ' ])
95+ ->addMethods (['getDiscountAmount ' , 'setDiscountAmount ' , 'getDiscountQty ' , 'setDiscountQty ' , ])
96+ ->onlyMethods (['load ' , 'getId ' , 'getData ' , ' getStoreLabels ' ])
9797 ->disableOriginalConstructor ()
9898 ->getMock ();
9999 $ this ->collectionMock ->expects ($ this ->once ())->method ('getItems ' )->willReturn ([$ ruleMock ]);
@@ -105,6 +105,7 @@ public function testGetData()
105105 $ ruleMock ->expects ($ this ->once ())->method ('setDiscountAmount ' )->with (50 )->willReturn ($ ruleMock );
106106 $ ruleMock ->expects ($ this ->once ())->method ('getDiscountQty ' )->willReturn (20.010 );
107107 $ ruleMock ->expects ($ this ->once ())->method ('setDiscountQty ' )->with (20.01 )->willReturn ($ ruleMock );
108+ $ ruleMock ->expects ($ this ->once ())->method ('getStoreLabels ' )->willReturn (["1 " => "Store Label " ]);
108109
109110 $ this ->assertEquals ([$ ruleId => $ ruleData ], $ this ->model ->getData ());
110111 // Load from object-cache the second time
0 commit comments