24 use TYPO3\TestingFramework\Core\Unit\UnitTestCase;
41 $mockProcessingRule = $this->getAccessibleMock(ProcessingRule::class, [
47 $validators = $mockProcessingRule->_get(
'validator')->getValidators();
48 $validators->rewind();
49 $this->assertInstanceOf(AbstractValidator::class, $validators->current());
57 $objectManagerProphecy = $this->prophesize(ObjectManager::class);
58 GeneralUtility::setSingletonInstance(ObjectManager::class, $objectManagerProphecy->reveal());
59 $resultProphecy = $this->prophesize(Result::class);
61 $objectManagerProphecy
63 ->willReturn($resultProphecy->reveal());
65 $mockProcessingRule = $this->getAccessibleMock(ProcessingRule::class, [
69 $mockProcessingRule->_set(
'dataType',
null);
70 $mockProcessingRule->_set(
'processingMessages', $resultProphecy->reveal());
74 $this->assertSame($input, $mockProcessingRule->_call(
'process', $input));
82 $objectManagerProphecy = $this->prophesize(ObjectManager::class);
83 GeneralUtility::setSingletonInstance(ObjectManager::class, $objectManagerProphecy->reveal());
85 $objectManagerProphecy
89 $mockProcessingRule = $this->getAccessibleMock(ProcessingRule::class, [
93 $mockProcessingRule->_set(
'dataType',
null);
98 $mockProcessingRule->_call(
'process', $input);
100 $this->assertTrue($mockProcessingRule->_get(
'processingMessages')->hasErrors());