@@ -71,10 +71,10 @@ public function isValidTitleDataProvider()
71
71
{
72
72
$ mess = ['option required fields ' => 'Missed values for option required fields ' ];
73
73
return [
74
- ['option_title ' , 'name 1.1 ' , 'fixed ' , new \Magento \Framework \DataObject (['store_id ' => 1 ]), [], true ],
75
- ['option_title ' , 'name 1.1 ' , 'fixed ' , new \Magento \Framework \DataObject (['store_id ' => 0 ]), [], true ],
76
- [null , 'name 1.1 ' , 'fixed ' , new \Magento \Framework \DataObject (['store_id ' => 1 ]), [], true ],
77
- [null , 'name 1.1 ' , 'fixed ' , new \Magento \Framework \DataObject (['store_id ' => 0 ]), $ mess , false ],
74
+ ['option_title ' , 'name 1.1 ' , 'fixed ' , 10 , new \Magento \Framework \DataObject (['store_id ' => 1 ]), [], true ],
75
+ ['option_title ' , 'name 1.1 ' , 'fixed ' , 10 , new \Magento \Framework \DataObject (['store_id ' => 0 ]), [], true ],
76
+ [null , 'name 1.1 ' , 'fixed ' , 10 , new \Magento \Framework \DataObject (['store_id ' => 1 ]), [], true ],
77
+ [null , 'name 1.1 ' , 'fixed ' , 10 , new \Magento \Framework \DataObject (['store_id ' => 0 ]), $ mess , false ],
78
78
];
79
79
}
80
80
@@ -87,14 +87,14 @@ public function isValidTitleDataProvider()
87
87
* @param bool $result
88
88
* @dataProvider isValidTitleDataProvider
89
89
*/
90
- public function testIsValidTitle ($ title , $ type , $ priceType , $ product , $ messages , $ result )
90
+ public function testIsValidTitle ($ title , $ type , $ priceType , $ price , $ product , $ messages , $ result )
91
91
{
92
- $ methods = ['getTitle ' , 'getType ' , 'getPriceType ' , '__wakeup ' , 'getProduct ' ];
92
+ $ methods = ['getTitle ' , 'getType ' , 'getPriceType ' , 'getPrice ' , ' __wakeup ' , 'getProduct ' ];
93
93
$ valueMock = $ this ->createPartialMock (\Magento \Catalog \Model \Product \Option::class, $ methods );
94
94
$ valueMock ->expects ($ this ->once ())->method ('getTitle ' )->will ($ this ->returnValue ($ title ));
95
95
$ valueMock ->expects ($ this ->any ())->method ('getType ' )->will ($ this ->returnValue ($ type ));
96
96
$ valueMock ->expects ($ this ->once ())->method ('getPriceType ' )->will ($ this ->returnValue ($ priceType ));
97
- // $valueMock->expects($this->once())->method('getPrice')->will($this->returnValue($price));
97
+ $ valueMock ->expects ($ this ->once ())->method ('getPrice ' )->will ($ this ->returnValue ($ price ));
98
98
$ valueMock ->expects ($ this ->once ())->method ('getProduct ' )->will ($ this ->returnValue ($ product ));
99
99
100
100
$ this ->localeFormatMock ->expects ($ this ->once ())->method ('getNumber ' )->will ($ this ->returnValue ($ price ));
0 commit comments