17 use Prophecy\Argument;
18 use Prophecy\Prophecy\ObjectProphecy;
22 use TYPO3\TestingFramework\Core\Unit\UnitTestCase;
34 protected function setUp()
44 $this->expectException(\UnexpectedValueException::class);
45 $this->expectExceptionCode(1441108674);
46 $this->subject->compile([]);
55 $formDataProviderProphecy = $this->prophesize(FormDataProviderInterface::class);
56 GeneralUtility::addInstance(FormDataProviderInterface::class, $formDataProviderProphecy->reveal());
57 $formDataProviderProphecy->addData(Argument::cetera())->willReturnArgument(0);
59 FormDataProviderInterface::class,
61 $this->subject->setProviderList($providerList);
67 $this->assertEquals($input, $this->subject->compile($input));
76 $formDataProviderProphecy = $this->prophesize(FormDataProviderInterface::class);
77 GeneralUtility::addInstance(FormDataProviderInterface::class, $formDataProviderProphecy->reveal());
80 FormDataProviderInterface::class,
82 $this->subject->setProviderList($providerList);
83 $providerResult = [
'foo'];
84 $formDataProviderProphecy->addData(Argument::cetera())->shouldBeCalled()->willReturn($providerResult);
86 $this->assertEquals($providerResult, $this->subject->compile([]));
95 $formDataProviderProphecy = $this->prophesize(\stdClass::class);
96 GeneralUtility::addInstance(\stdClass::class, $formDataProviderProphecy->reveal());
100 $this->subject->setProviderList($providerList);
102 $this->expectException(\UnexpectedValueException::class);
103 $this->expectExceptionCode(1441108719);
104 $this->subject->compile([]);