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 14
14
use Magento \Catalog \Model \Product \Type ;
15
15
use Magento \Framework \Event ;
16
16
use Magento \Framework \Event \Observer ;
17
+ use Magento \Framework \TestFramework \Unit \Helper \ObjectManager ;
17
18
use PHPUnit \Framework \MockObject \MockObject ;
18
19
use PHPUnit \Framework \TestCase ;
19
20
@@ -54,6 +55,7 @@ class SetAttributeTabBlockObserverTest extends TestCase
54
55
*/
55
56
public function setUp ()
56
57
{
58
+ $ objectManager = new ObjectManager ($ this );
57
59
$ this ->helperCatalogMock = $ this ->createMock (Catalog::class);
58
60
$ this ->observerMock = $ this ->createMock (Observer::class);
59
61
$ this ->eventMock = $ this ->getMockBuilder (Event::class)
@@ -64,8 +66,11 @@ public function setUp()
64
66
->disableOriginalConstructor ()
65
67
->getMock ();
66
68
67
- $ this ->observer = new SetAttributeTabBlockObserver (
68
- $ this ->helperCatalogMock
69
+ $ this ->observer = $ objectManager ->getObject (
70
+ SetAttributeTabBlockObserver::class,
71
+ [
72
+ 'helperCatalog ' => $ this ->helperCatalogMock
73
+ ]
69
74
);
70
75
}
71
76
You can’t perform that action at this time.
0 commit comments