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()
7575 ['selection_price_type ' , 'selection_price_value ' ]
7676 );
7777
78+
7879 $ parentResources = $ this ->createMock (ResourceConnection::class);
7980 $ parentResources ->expects ($ this ->once ())->method ('getConnection ' )->willReturn ($ connection );
8081 $ parentResources ->expects ($ this ->once ())->method ('getTableName ' )
8182 ->with ('catalog_product_bundle_selection_price ' , 'test_connection_name ' )
8283 ->willReturn ('catalog_product_bundle_selection_price ' );
84+ $ this ->context ->expects ($ this ->once ())->method ('getResources ' )->willReturn ($ parentResources );
8385
8486 $ 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-
9087 $ selection ->saveSelectionPrice ($ item );
9188 }
9289}
You can’t perform that action at this time.
0 commit comments