/** * @expectedException \Nelmio\Alice\Throwable\Exception\FixtureBuilder\Denormalizer\DenormalizerNotFoundException * @expectedExceptionMessage No suitable fixture denormalizer found to handle the fixture with the reference "user0". */ public function testThrowsExceptionIfNotSuitableDenormalizer() { $builtFixtures = new FixtureBag(); $className = 'Nelmio\\Alice\\Entity\\User'; $reference = 'user0'; $specs = ['username' => '<name()>']; $flags = new FlagBag(''); $flagParserProphecy = $this->prophesize(FlagParserInterface::class); $flagParserProphecy->parse(Argument::any())->shouldNotBeCalled(); /** @var FlagParserInterface $flagParser */ $flagParser = $flagParserProphecy->reveal(); $denormalizer = new FixtureDenormalizerRegistry($flagParser, []); $denormalizer->denormalize($builtFixtures, $className, $reference, $specs, $flags); }