2 namespace TYPO3\CMS\Install\Tests\Unit\ViewHelpers\Format;
32 protected function setUp()
34 $this->viewHelper = $this->getMock(\TYPO3\CMS\Install\ViewHelpers\Format\PhpErrorCodeViewHelper::class, array(
'dummy'));
36 $renderingContext = $this->getMock(RenderingContext::class);
37 $this->viewHelper->setRenderingContext($renderingContext);
47 'errorCode' => E_ERROR,
48 'expectedString' =>
'E_ERROR',
52 'expectedString' =>
'E_ALL',
55 'errorCode' => E_ERROR ^ E_WARNING ^ E_PARSE,
56 'expectedString' =>
'E_ERROR | E_WARNING | E_PARSE',
59 'errorCode' => E_RECOVERABLE_ERROR ^ E_USER_DEPRECATED,
60 'expectedString' =>
'E_RECOVERABLE_ERROR | E_USER_DEPRECATED',
73 $actualString = $this->viewHelper->render($errorCode);
74 $this->assertEquals($expectedString, $actualString);