File tree Expand file tree Collapse file tree 1 file changed +2
-5
lines changed
app/code/Magento/Bundle/Test/Unit/Model/ResourceModel Expand file tree Collapse file tree 1 file changed +2
-5
lines changed Original file line number Diff line number Diff line change @@ -75,18 +75,15 @@ public function testSaveSelectionPrice()
75
75
['selection_price_type ' , 'selection_price_value ' ]
76
76
);
77
77
78
+
78
79
$ parentResources = $ this ->createMock (ResourceConnection::class);
79
80
$ parentResources ->expects ($ this ->once ())->method ('getConnection ' )->willReturn ($ connection );
80
81
$ parentResources ->expects ($ this ->once ())->method ('getTableName ' )
81
82
->with ('catalog_product_bundle_selection_price ' , 'test_connection_name ' )
82
83
->willReturn ('catalog_product_bundle_selection_price ' );
84
+ $ this ->context ->expects ($ this ->once ())->method ('getResources ' )->willReturn ($ parentResources );
83
85
84
86
$ selection = new ResourceSelection ($ this ->context , $ this ->metadataPool , 'test_connection_name ' );
85
- $ reflect = new \ReflectionClass ($ selection );
86
- $ property = $ reflect ->getProperty ('_resources ' );
87
- $ property ->setAccessible (true );
88
- $ property ->setValue ($ selection , $ parentResources );
89
-
90
87
$ selection ->saveSelectionPrice ($ item );
91
88
}
92
89
}
You can’t perform that action at this time.
0 commit comments