Magento Extensions Rating 2024
EXTENSIONS BY CATEGORY
B2B (Business-To-Business)
Blog
Customer
ERP (Enterprise Resource Planning)
Mega Menu
One Step Checkout
Order
POS (Point Of Sale)
Search
Shopping Cart
Sitemap
SEO
Social
Stock & Inventory Management
EXTENSIONS BY DEVELOPER
aheadWorks
Amasty
Boost My Shop
BSS Commerce
Magestore
MageWorx
Mirasvit
Templates Master
Wyomind
XTENTO
Magento 2 Documentation
Magento 2 Documentation
2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
vendor
magento
magento2-base
dev
tests
integration
testsuite
Magento
CurrencySymbol
Controller
Adminhtml
System
Currency
FetchRatesTest.php
Go to the documentation of this file.
1
<?php
7
namespace
Magento\CurrencySymbol\Controller\Adminhtml\System\Currency
;
8
12
class
FetchRatesTest
extends
\Magento\TestFramework\TestCase\AbstractBackendController
13
{
19
public
function
testFetchRatesActionWithoutService
(): void
20
{
21
$request
= $this->
getRequest
();
22
$request
->setParam(
23
'rate_services'
,
24
null
25
);
26
$this->
dispatch
(
'backend/admin/system_currency/fetchRates'
);
27
28
$this->
assertSessionMessages
(
29
$this->contains(
'The Import Service is incorrect. Verify the service and try again.'
),
30
\
Magento
\Framework\Message\MessageInterface::TYPE_ERROR
31
);
32
}
33
39
public
function
testFetchRatesActionWithNonexistentService
(): void
40
{
41
$request
= $this->
getRequest
();
42
$request
->setParam(
43
'rate_services'
,
44
'non-existent-service'
45
);
46
$this->
dispatch
(
'backend/admin/system_currency/fetchRates'
);
47
48
$this->
assertSessionMessages
(
49
$this->contains(
"The import model can't be initialized. Verify the model and try again."
),
50
\
Magento
\Framework\Message\MessageInterface::TYPE_ERROR
51
);
52
}
53
}
Magento\TestFramework\TestCase\AbstractController\getRequest
getRequest()
Definition:
AbstractController.php:124
Magento\CurrencySymbol\Controller\Adminhtml\System\Currency\FetchRatesTest\testFetchRatesActionWithoutService
testFetchRatesActionWithoutService()
Definition:
FetchRatesTest.php:19
Magento\CurrencySymbol\Controller\Adminhtml\System\Currency\FetchRatesTest
Definition:
FetchRatesTest.php:12
Magento
$request
$request
Definition:
quote_with_configurable_product_last_variation.php:22
Magento\CurrencySymbol\Controller\Adminhtml\System\Currency\FetchRatesTest\testFetchRatesActionWithNonexistentService
testFetchRatesActionWithNonexistentService()
Definition:
FetchRatesTest.php:39
Magento\Backend\App\AbstractAction\dispatch
dispatch(\Magento\Framework\App\RequestInterface $request)
Definition:
AbstractAction.php:206
Magento\CurrencySymbol\Controller\Adminhtml\System\Currency
Definition:
FetchRatesTest.php:7
Magento\TestFramework\TestCase\AbstractBackendController\assertSessionMessages
assertSessionMessages(\PHPUnit\Framework\Constraint\Constraint $constraint, $messageType=null, $messageManagerClass=\Magento\Framework\Message\Manager::class)
Definition:
AbstractBackendController.php:96
Magento\TestFramework\TestCase\AbstractBackendController
Definition:
AbstractBackendController.php:15