Skip to content

Commit

Permalink
#21674 static-test-fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Nazar65 committed May 15, 2019
1 parent 057c13d commit 1c05b79
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
7 changes: 3 additions & 4 deletions app/code/Magento/Email/Model/AbstractTemplate.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,9 @@
use Magento\MediaStorage\Helper\File\Storage\Database;

/**
* Template model class
* Template model class.
*
* phpcs:disable Magento2.Classes.AbstractApi
* @author Magento Core Team <[email protected]>
* @SuppressWarnings(PHPMD.CouplingBetweenObjects)
* @SuppressWarnings(PHPMD.TooManyFields)
Expand Down Expand Up @@ -505,7 +506,6 @@ protected function addEmailVariables($variables, $storeId)

/**
* Apply design config so that emails are processed within the context of the appropriate area/store/theme.
* Can be called multiple times without issue.
*
* @return bool
*/
Expand Down Expand Up @@ -679,8 +679,7 @@ public function getTemplateFilter()
}

/**
* Save current design config and replace with design config from specified store
* Event is not dispatched.
* Save current design config and replace with design config from specified store. Event is not dispatched.
*
* @param null|bool|int|string $storeId
* @param string $area
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@
use Magento\Email\Model\BackendTemplate;
use Magento\Framework\ObjectManagerInterface;

/**
* Tests for adminhtml email template model.
*/
class BackendTemplateTest extends \PHPUnit\Framework\TestCase
{
/**
Expand Down Expand Up @@ -72,13 +75,13 @@ protected function setUp()
->method('get')
->willReturnCallback(
function ($value) {
switch($value) {
switch ($value) {
case \Magento\MediaStorage\Helper\File\Storage\Database::class:
return ($this->databaseHelperMock);
case \Magento\Email\Model\ResourceModel\Template::class:
return ($this->resourceModelMock);
default:
return(NULL);
return(null);
}
}
);
Expand Down

0 comments on commit 1c05b79

Please sign in to comment.