use Symfony\Component\Form\Exception\TransformationFailedException;
/**
* @author Bernhard Schussek <bschussek@gmail.com>
*/
class CollectionToArrayTransformerTest extends TestCase
{ private CollectionToArrayTransformer
$transformer;
protected function setUp(): void
{ $this->transformer =
new CollectionToArrayTransformer();
} public function testTransform() { $array =
[ 2 => 'foo',
3 => 'bar',
];
$this->
assertSame($array,
$this->transformer->
transform(new ArrayCollection($array)));
}