File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed
app/code/Magento/Bundle/Test/Unit/Observer Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change 1414use Magento \Catalog \Model \Product \Type ;
1515use Magento \Framework \Event ;
1616use Magento \Framework \Event \Observer ;
17+ use Magento \Framework \TestFramework \Unit \Helper \ObjectManager ;
1718use PHPUnit \Framework \MockObject \MockObject ;
1819use PHPUnit \Framework \TestCase ;
1920
@@ -54,6 +55,7 @@ class SetAttributeTabBlockObserverTest extends TestCase
5455 */
5556 public function setUp ()
5657 {
58+ $ objectManager = new ObjectManager ($ this );
5759 $ this ->helperCatalogMock = $ this ->createMock (Catalog::class);
5860 $ this ->observerMock = $ this ->createMock (Observer::class);
5961 $ this ->eventMock = $ this ->getMockBuilder (Event::class)
@@ -64,8 +66,11 @@ public function setUp()
6466 ->disableOriginalConstructor ()
6567 ->getMock ();
6668
67- $ this ->observer = new SetAttributeTabBlockObserver (
68- $ this ->helperCatalogMock
69+ $ this ->observer = $ objectManager ->getObject (
70+ SetAttributeTabBlockObserver::class,
71+ [
72+ 'helperCatalog ' => $ this ->helperCatalogMock
73+ ]
6974 );
7075 }
7176
You can’t perform that action at this time.
0 commit comments