File tree Expand file tree Collapse file tree 1 file changed +17
-1
lines changed
app/code/Magento/Email/Test/Unit/Model Expand file tree Collapse file tree 1 file changed +17
-1
lines changed Original file line number Diff line number Diff line change @@ -438,11 +438,27 @@ public function testGetDesignConfig()
438
438
* @return void
439
439
*/
440
440
public function testSetForcedAreaWhenAreaIsSet (): void
441
+ {
442
+ $ templateId = 'test_template ' ;
443
+ $ model = $ this ->getModelMock ([], ['area ' => null ]);
444
+
445
+ $ this ->emailConfig ->expects ($ this ->once ())
446
+ ->method ('getTemplateArea ' )
447
+ ->with ($ templateId );
448
+
449
+ $ model ->setForcedArea ($ templateId );
450
+ }
451
+
452
+ /**
453
+ * @return void
454
+ */
455
+ public function testNotSetForcedAreaWhenAreaIsSet (): void
441
456
{
442
457
$ templateId = 'test_template ' ;
443
458
$ model = $ this ->getModelMock ([], ['area ' => 'frontend ' ]);
444
459
445
- $ this ->emailConfig ->expects ($ this ->never ())->method ('getTemplateArea ' );
460
+ $ this ->emailConfig ->expects ($ this ->never ())
461
+ ->method ('getTemplateArea ' );
446
462
447
463
$ model ->setForcedArea ($ templateId );
448
464
}
You can’t perform that action at this time.
0 commit comments