9 use Zend\Code\Reflection\ClassReflection;
24 $this->nameFinder = new \Magento\Framework\Reflection\NameFinder();
29 $class =
new ClassReflection(\
Magento\Framework\Reflection\Test\Unit\DataObject::class);
30 $setterName = $this->nameFinder->getSetterMethodName(
$class,
'AttrName');
31 $this->assertEquals(
"setAttrName", $setterName);
33 $booleanSetterName = $this->nameFinder->getSetterMethodName(
$class,
'Active');
34 $this->assertEquals(
"setIsActive", $booleanSetterName);
45 $class =
new ClassReflection(\
Magento\Framework\Reflection\Test\Unit\DataObject::class);
46 $this->nameFinder->getSetterMethodName(
$class,
'InvalidAttribute');
57 $class =
new ClassReflection(\
Magento\Framework\Reflection\Test\Unit\DataObject::class);
58 $this->nameFinder->getSetterMethodName(
$class,
'ActivE');
68 $reflectionClass->expects($this->atLeastOnce())->method(
'hasMethod')->willReturn(
false);
69 $reflectionClass->expects($this->atLeastOnce())->method(
'getName')->willReturn(
'className');
71 $this->nameFinder->findAccessorMethodName(
testGetSetterMethodNameWrongCamelCasedAttribute()
$_option $_optionId $class
testGetSetterMethodNameInvalidAttribute()
testFindAccessorMethodName()
testGetSetterMethodName()