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
Reflection
Test
Unit
FieldNamerTest.php
Go to the documentation of this file.
1
<?php
6
namespace
Magento\Framework\Reflection\Test\Unit
;
7
8
use
Magento\Framework\Reflection\FieldNamer
;
9
13
class
FieldNamerTest
extends
\PHPUnit\Framework\TestCase
14
{
18
private
$model;
19
23
protected
function
setUp
()
24
{
25
$objectManager
= new \Magento\Framework\TestFramework\Unit\Helper\ObjectManager($this);
26
$this->model =
$objectManager
->getObject(\
Magento
\Framework\Reflection\FieldNamer::class);
27
}
28
34
public
function
testGetFieldNameForMethodName
($methodName, $expectedName)
35
{
36
$value
= $this->model->getFieldNameForMethodName($methodName);
37
$this->assertEquals(
$value
, $expectedName);
38
}
39
43
public
function
methodNameProvider
()
44
{
45
return
[
46
'isMethod'
=> [
'isValid'
,
'valid'
],
47
'getMethod'
=> [
'getValue'
,
'value'
],
48
'hasMethod'
=> [
'hasStuff'
,
'stuff'
],
49
'randomMethod'
=> [
'randomMethod'
,
null
],
50
];
51
}
52
}
Magento\Framework\Reflection\Test\Unit\FieldNamerTest\testGetFieldNameForMethodName
testGetFieldNameForMethodName($methodName, $expectedName)
Definition:
FieldNamerTest.php:34
$objectManager
$objectManager
Definition:
bootstrap.php:17
Magento\Framework\Reflection\Test\Unit\FieldNamerTest
Definition:
FieldNamerTest.php:13
$value
$value
Definition:
gender.phtml:16
Magento\Framework\Reflection\FieldNamer
Definition:
FieldNamer.php:14
Magento\Framework\Reflection\Test\Unit
Definition:
AttributeTypeResolverTest.php:7
Magento
Magento\Framework\Reflection\Test\Unit\FieldNamerTest\setUp
setUp()
Definition:
FieldNamerTest.php:23
Magento\Framework\Reflection\Test\Unit\FieldNamerTest\methodNameProvider
methodNameProvider()
Definition:
FieldNamerTest.php:43