23 private $objectManagerHelper;
37 $this->requestMock = $this->getMockBuilder(RequestInterface::class)
38 ->getMockForAbstractClass();
39 $this->subjectMock = $this->getMockBuilder(FieldConfigStructureMock::class)
40 ->disableOriginalConstructor()
43 $this->objectManagerHelper =
new ObjectManagerHelper($this);
44 $this->plugin = $this->objectManagerHelper->getObject(
45 FieldConfigStructurePlugin::class,
46 [
'request' => $this->requestMock]
52 $someResult =
'some result';
54 $this->assertEquals($someResult, $this->plugin->afterGetConfigPath($this->subjectMock, $someResult));
59 $this->requestMock->expects(static::once())
62 ->willReturn(
'non-payment');
64 $this->assertNull($this->plugin->afterGetConfigPath($this->subjectMock,
null));
75 $this->requestMock->expects(static::once())
78 ->willReturn(
'payment');
79 $this->subjectMock->expects(static::once())
81 ->willReturn($subjectPath);
83 $this->assertEquals($expectedConfigPath, $this->plugin->afterGetConfigPath($this->subjectMock,
null));
92 [
'payment_us/group/field',
'payment/group/field'],
93 [
'payment_other/group/field',
'payment/group/field'],
94 [
'payment_us',
'payment_us'],
95 [
'payment_wrong_country/group/field',
'payment_wrong_country/group/field']
testAroundGetConfigPath($subjectPath, $expectedConfigPath)
testAroundGetConfigPathHasResult()
afterGetConfigPathDataProvider()
testAroundGetConfigPathNonPaymentSection()