Ejemplo n.º 1
0
 /**
  * @inheritdoc
  */
 public function process(UnitOfWork $uow)
 {
     $co = CommitOrderCalculator::getCommitOrderFromMetadata($this->metadataFactory);
     $set = self::prepareCommitOrderArray($co);
     $this->executeInserts($uow, $set);
     $this->executeUpdateDeletes($uow, $set);
 }
 /**
  * @test
  */
 public function verify_commit_ordering_from_metadata()
 {
     $dm = $this->createDocumentManager([], ['test/Doctrine/ODM/OrientDB/Tests/Document/Stub/Linked']);
     $mdf = $dm->getMetadataFactory();
     $sorted = CommitOrderCalculator::getCommitOrderFromMetadata($mdf);
     $expected = [Contact::class, Phone::class, EmailAddress::class];
     $this->assertSame($expected, $sorted);
 }