@@ -52,21 +52,23 @@ protected function mockModel($filesystem = null)
52
52
53
53
$ this ->model = $ this ->getMockBuilder (\Magento \Email \Model \Template::class)
54
54
->setMethods (['_getMail ' ])
55
- ->setConstructorArgs ([
56
- $ this ->objectManager ->get (\Magento \Framework \Model \Context::class),
57
- $ this ->objectManager ->get (\Magento \Framework \View \DesignInterface::class),
58
- $ this ->objectManager ->get (\Magento \Framework \Registry::class),
59
- $ this ->objectManager ->get (\Magento \Store \Model \App \Emulation::class),
60
- $ this ->objectManager ->get (\Magento \Store \Model \StoreManager::class),
61
- $ this ->objectManager ->create (\Magento \Framework \View \Asset \Repository::class),
62
- $ filesystem ,
63
- $ this ->objectManager ->create (\Magento \Framework \App \Config \ScopeConfigInterface::class),
64
- $ this ->objectManager ->get (\Magento \Email \Model \Template \Config::class),
65
- $ this ->objectManager ->get (\Magento \Email \Model \TemplateFactory::class),
66
- $ this ->objectManager ->get (\Magento \Framework \Filter \FilterManager::class),
67
- $ this ->objectManager ->get (\Magento \Framework \UrlInterface::class),
68
- $ this ->objectManager ->get (\Magento \Email \Model \Template \FilterFactory::class),
69
- ])
55
+ ->setConstructorArgs (
56
+ [
57
+ $ this ->objectManager ->get (\Magento \Framework \Model \Context::class),
58
+ $ this ->objectManager ->get (\Magento \Framework \View \DesignInterface::class),
59
+ $ this ->objectManager ->get (\Magento \Framework \Registry::class),
60
+ $ this ->objectManager ->get (\Magento \Store \Model \App \Emulation::class),
61
+ $ this ->objectManager ->get (\Magento \Store \Model \StoreManager::class),
62
+ $ this ->objectManager ->create (\Magento \Framework \View \Asset \Repository::class),
63
+ $ filesystem ,
64
+ $ this ->objectManager ->create (\Magento \Framework \App \Config \ScopeConfigInterface::class),
65
+ $ this ->objectManager ->get (\Magento \Email \Model \Template \Config::class),
66
+ $ this ->objectManager ->get (\Magento \Email \Model \TemplateFactory::class),
67
+ $ this ->objectManager ->get (\Magento \Framework \Filter \FilterManager::class),
68
+ $ this ->objectManager ->get (\Magento \Framework \UrlInterface::class),
69
+ $ this ->objectManager ->get (\Magento \Email \Model \Template \FilterFactory::class),
70
+ ]
71
+ )
70
72
->getMock ();
71
73
72
74
$ this ->objectManager ->get (\Magento \Framework \App \State::class)->setAreaCode ('frontend ' );
@@ -122,12 +124,14 @@ public function testGetProcessedTemplate()
122
124
->load ();
123
125
124
126
$ expectedViewUrl = '/frontend/Magento/blank/en_US/Magento_Theme/favicon.ico ' ;
125
- $ this ->model ->setDesignConfig ([
126
- 'area ' => 'frontend ' ,
127
- 'store ' => $ this ->objectManager ->get (\Magento \Store \Model \StoreManagerInterface::class)
128
- ->getStore ('fixturestore ' )
129
- ->getId (),
130
- ]);
127
+ $ this ->model ->setDesignConfig (
128
+ [
129
+ 'area ' => 'frontend ' ,
130
+ 'store ' => $ this ->objectManager ->get (\Magento \Store \Model \StoreManagerInterface::class)
131
+ ->getStore ('fixturestore ' )
132
+ ->getId (),
133
+ ]
134
+ );
131
135
$ this ->model ->setTemplateText ('{{view url="Magento_Theme::favicon.ico"}} ' );
132
136
133
137
$ this ->setNotDefaultThemeForFixtureStore ();
@@ -373,9 +377,11 @@ public function testTemplateStylesVariable($area, $expectedOutput, $unexpectedOu
373
377
// @styles comments by default, it is necessary to mock an object to return testable contents
374
378
$ themeDirectory = $ this ->getMockBuilder (\Magento \Framework \Filesystem \Directory \ReadInterface::class)
375
379
->disableOriginalConstructor ()
376
- ->setMethods ([
377
- 'readFile ' ,
378
- ])
380
+ ->setMethods (
381
+ [
382
+ 'readFile ' ,
383
+ ]
384
+ )
379
385
->getMockForAbstractClass ();
380
386
381
387
$ themeDirectory ->expects ($ this ->once ())
@@ -478,10 +484,12 @@ protected function setUpAdminThemeFallback()
478
484
$ adminStore = $ this ->objectManager ->create (\Magento \Store \Model \Store::class)
479
485
->load (Store::ADMIN_CODE );
480
486
481
- $ this ->model ->setDesignConfig ([
482
- 'area ' => 'adminhtml ' ,
483
- 'store ' => $ adminStore ->getId (),
484
- ]);
487
+ $ this ->model ->setDesignConfig (
488
+ [
489
+ 'area ' => 'adminhtml ' ,
490
+ 'store ' => $ adminStore ->getId (),
491
+ ]
492
+ );
485
493
}
486
494
487
495
/**
@@ -516,12 +524,14 @@ protected function setUpThemeFallback($area)
516
524
'fixturestore '
517
525
);
518
526
519
- $ this ->model ->setDesignConfig ([
520
- 'area ' => 'frontend ' ,
521
- 'store ' => $ this ->objectManager ->get (\Magento \Store \Model \StoreManagerInterface::class)
522
- ->getStore ('fixturestore ' )
523
- ->getId (),
524
- ]);
527
+ $ this ->model ->setDesignConfig (
528
+ [
529
+ 'area ' => 'frontend ' ,
530
+ 'store ' => $ this ->objectManager ->get (\Magento \Store \Model \StoreManagerInterface::class)
531
+ ->getStore ('fixturestore ' )
532
+ ->getId (),
533
+ ]
534
+ );
525
535
}
526
536
527
537
/**
@@ -578,12 +588,14 @@ public function testGetProcessedTemplateSubject()
578
588
->load ();
579
589
580
590
$ this ->model ->setTemplateSubject ('{{view url="Magento_Theme::favicon.ico"}} ' );
581
- $ this ->model ->setDesignConfig ([
582
- 'area ' => 'frontend ' ,
583
- 'store ' => $ this ->objectManager ->get (\Magento \Store \Model \StoreManagerInterface::class)
584
- ->getStore ('fixturestore ' )
585
- ->getId (),
586
- ]);
591
+ $ this ->model ->setDesignConfig (
592
+ [
593
+ 'area ' => 'frontend ' ,
594
+ 'store ' => $ this ->objectManager ->get (\Magento \Store \Model \StoreManagerInterface::class)
595
+ ->getStore ('fixturestore ' )
596
+ ->getId (),
597
+ ]
598
+ );
587
599
588
600
$ this ->setNotDefaultThemeForFixtureStore ();
589
601
$ this ->assertStringMatchesFormat (
@@ -703,8 +715,8 @@ public function testGetVariablesOptionArrayInGroup()
703
715
$ testTemplateVariables = '{"var data.name":"Sender Name","var data.email":"Sender Email"} ' ;
704
716
$ this ->model ->setOrigTemplateVariables ($ testTemplateVariables );
705
717
$ variablesOptionArray = $ this ->model ->getVariablesOptionArray (true );
706
- $ this ->assertEquals ('Template Variables ' , $ variablesOptionArray [0 ][ 'label ' ]->getText ());
707
- $ this ->assertEquals ($ this ->model ->getVariablesOptionArray (), $ variablesOptionArray [0 ][ 'value ' ]);
718
+ $ this ->assertEquals ('Template Variables ' , $ variablesOptionArray ['label ' ]->getText ());
719
+ $ this ->assertEquals ($ this ->model ->getVariablesOptionArray (), $ variablesOptionArray ['value ' ]);
708
720
}
709
721
710
722
/**
0 commit comments