56 $this->formProphecy = $this->prophesize(
'TYPO3\\CMS\\Form\\Domain\\Model\\Form');
58 $this->typoScriptFactoryProphecy = $this->prophesize(
'TYPO3\\CMS\\Form\\Domain\\Factory\\TypoScriptFactory');
59 $this->typoScriptFactoryProphecy->getLayoutFromTypoScript(Argument::any())->willReturn(array());
62 $this->typoScriptLayoutProphecy = $this->prophesize(
'TYPO3\\CMS\\Form\\Layout');
64 $templateServiceProphecy = $this->prophesize(
'TYPO3\\CMS\\Core\\TypoScript\\TemplateService');
65 $templateServiceProphecy->sortedKeyList(Argument::any())->willReturn(array(10, 20));
83 20 =>
'TYPO3\\CMS\\Form\\Tests\\Unit\\Fixtures\\PostProcessorWithoutFormPrefixFixture' 86 $subject =
new PostProcessor($this->formProphecy->reveal(), $typoScript);
87 $this->typoScriptFactoryProphecy->setLayoutHandler($typoScript)->willReturn($this->typoScriptLayoutProphecy->reveal());
89 $this->assertEquals(
'processedWithoutPrefix', $subject->process());
98 20 =>
'TYPO3\\CMS\\Form\\Tests\\Unit\\Fixtures\\PostProcessorWithFormPrefixFixture' 101 $subject =
new PostProcessor($this->formProphecy->reveal(), $typoScript);
102 $this->typoScriptFactoryProphecy->setLayoutHandler($typoScript)->willReturn($this->typoScriptLayoutProphecy->reveal());
104 $this->assertEquals(
'processedWithPrefix', $subject->process());
113 20 =>
'TYPO3\\CMS\\Form\\Tests\\Unit\\Fixtures\\PostProcessorWithoutInterfaceFixture' 116 $subject =
new PostProcessor($this->formProphecy->reveal(), $typoScript);
117 $this->typoScriptFactoryProphecy->setLayoutHandler($typoScript)->willReturn($this->typoScriptLayoutProphecy->reveal());
119 $this->assertEquals(
'', $subject->process());
126 $processorConfig = array(
127 'recipientEmail' =>
'your@email.com',
128 'senderEmail' =>
'your@email.com',
132 'label' =>
'<div class="global"><labelvalue /></div>',
135 '1.' => $processorConfig
138 $subject =
new PostProcessor($this->formProphecy->reveal(), $typoScript);
139 $this->typoScriptFactoryProphecy->setLayoutHandler($typoScript)->willReturn($this->typoScriptLayoutProphecy->reveal());
141 $this->assertEquals(
'', $subject->process());
148 $processorConfig = array(
150 'label' =>
'<div class="local"><labelvalue /></div>',
152 'recipientEmail' =>
'your@email.com',
153 'senderEmail' =>
'your@email.com',
157 'label' =>
'<div class="global"><labelvalue /></div>',
160 '1.' => $processorConfig
163 $subject =
new PostProcessor($this->formProphecy->reveal(), $typoScript);
164 $this->typoScriptFactoryProphecy->setLayoutHandler($processorConfig)->willReturn($this->typoScriptLayoutProphecy->reveal());
166 $this->assertEquals(
'', $subject->process());
static getSingletonInstances()
static setSingletonInstance($className, \TYPO3\CMS\Core\SingletonInterface $instance)
processFindsClassSpecifiedByTypoScriptWithoutFormPrefix()
processFindsClassSpecifiedByTypoScriptWithFormPrefix()
static addInstance($className, $instance)
processReturnsEmptyStringIfSpecifiedPostProcessorDoesNotImplementTheInterface()
static resetSingletonInstances(array $newSingletonInstances)
processUsesGlobalLayoutIfNoneIsSet()
$typoScriptLayoutProphecy
$typoScriptFactoryProphecy
processUsesLocalLayoutIfSet()