/**
* @requires function \Doctrine\Common\Collections\ArrayCollection::__construct
*/
class DoctrineCasterTest extends TestCase
{ use VarDumperTestTrait;
public function testCastPersistentCollection() { $classMetadata =
new ClassMetadata(__CLASS__
);
$collection =
new PersistentCollection($this->
createMock(EntityManagerInterface::
class),
$classMetadata,
new ArrayCollection(['test'
]));
$expected = <<<EODUMP
Doctrine\ORM\PersistentCollection {
%A
-em: Mock_EntityManagerInterface_%s { …3}
-backRefFieldName: null
-typeClass: Doctrine\ORM\Mapping\ClassMetadata { …}
%A
EODUMP;
$this->
assertDumpMatchesFormat($expected,
$collection);
}