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
framework
Oauth
Test
Unit
OauthInputExceptionTest.php
Go to the documentation of this file.
1
<?php
7
namespace
Magento\Framework\Oauth\Test\Unit
;
8
9
use \Magento\Framework\Oauth\OauthInputException;
10
use
Magento\Framework\Phrase
;
11
12
class
OauthInputExceptionTest
extends
\PHPUnit\Framework\TestCase
13
{
17
public
function
testGetAggregatedErrorMessage
()
18
{
19
$exception =
new
OauthInputException
();
20
foreach
([
'field1'
,
'field2'
] as $param) {
21
$exception->addError(
22
new
Phrase
(
'"%fieldName" is required. Enter and try again.'
, [
'fieldName'
=> $param])
23
);
24
}
25
$exception->addError(
new
Phrase
(
'Message with period.'
));
26
27
$this->assertEquals(
28
'"field1" is required. Enter and try again, "field2" is required. Enter and try again, Message with period'
,
29
$exception->getAggregatedErrorMessage()
30
);
31
}
32
36
public
function
testGetAggregatedErrorMessageNoError
()
37
{
38
$exception =
new
OauthInputException
();
39
$this->assertEquals(
''
, $exception->getAggregatedErrorMessage());
40
}
41
}
Magento\Framework\Oauth\Test\Unit\OauthInputExceptionTest\testGetAggregatedErrorMessage
testGetAggregatedErrorMessage()
Definition:
OauthInputExceptionTest.php:17
Magento\Framework\Oauth\Test\Unit
Magento\Framework\Phrase
Definition:
Phrase.php:17
Magento\Framework\Phrase
Magento\Framework\Oauth\Test\Unit\OauthInputExceptionTest
Definition:
OauthInputExceptionTest.php:12
Magento\Framework\Oauth\Test\Unit\OauthInputExceptionTest\testGetAggregatedErrorMessageNoError
testGetAggregatedErrorMessageNoError()
Definition:
OauthInputExceptionTest.php:36
Magento\Framework\Oauth\OauthInputException
Definition:
OauthInputException.php:15