Skip to content

Commit d66329a

Browse files
committed
Fixed DefaultValidatorTest
1 parent d43a52f commit d66329a

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

app/code/Magento/Catalog/Test/Unit/Model/Product/Option/Validator/DefaultValidatorTest.php

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -71,10 +71,10 @@ public function isValidTitleDataProvider()
7171
{
7272
$mess = ['option required fields' => 'Missed values for option required fields'];
7373
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],
7878
];
7979
}
8080

@@ -87,14 +87,14 @@ public function isValidTitleDataProvider()
8787
* @param bool $result
8888
* @dataProvider isValidTitleDataProvider
8989
*/
90-
public function testIsValidTitle($title, $type, $priceType, $product, $messages, $result)
90+
public function testIsValidTitle($title, $type, $priceType, $price, $product, $messages, $result)
9191
{
92-
$methods = ['getTitle', 'getType', 'getPriceType', '__wakeup', 'getProduct'];
92+
$methods = ['getTitle', 'getType', 'getPriceType', 'getPrice', '__wakeup', 'getProduct'];
9393
$valueMock = $this->createPartialMock(\Magento\Catalog\Model\Product\Option::class, $methods);
9494
$valueMock->expects($this->once())->method('getTitle')->will($this->returnValue($title));
9595
$valueMock->expects($this->any())->method('getType')->will($this->returnValue($type));
9696
$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));
9898
$valueMock->expects($this->once())->method('getProduct')->will($this->returnValue($product));
9999

100100
$this->localeFormatMock->expects($this->once())->method('getNumber')->will($this->returnValue($price));

0 commit comments

Comments
 (0)