public function testOnlyAcceptsChainableFixtureDenormalizers()
{
$flagParser = new FakeFlagParser();
try {
new FixtureDenormalizerRegistry($flagParser, [new \stdClass()]);
$this->fail('Expected exception to be thrown.');
} catch (\TypeError $error) {
$this->assertEquals('Expected denormalizer 0 to be a ' . '"Nelmio\\Alice\\FixtureBuilder\\Denormalizer\\Fixture\\ChainableFixtureDenormalizerInterface", got ' . '"stdClass" instead.', $error->getMessage());
}
try {
new FixtureDenormalizerRegistry($flagParser, [1]);
$this->fail('Expected exception to be thrown.');
} catch (\TypeError $error) {
$this->assertEquals('Expected denormalizer 0 to be a ' . '"Nelmio\\Alice\\FixtureBuilder\\Denormalizer\\Fixture\\ChainableFixtureDenormalizerInterface", got ' . '"integer" instead.', $error->getMessage());
}
}