1
0
mirror of synced 2025-02-02 13:31:45 +03:00

Update DDC3033Test.php

This commit is contained in:
Thomas Lallement 2014-03-18 15:04:48 +01:00 committed by Benjamin Eberlei
parent 0ff3cdf150
commit 7338c2d1f8

View File

@ -31,23 +31,23 @@ class DDC3033Test extends \Doctrine\Tests\OrmFunctionalTestCase
$product->setTitle("Test product");
$product->addBuyer($user);
$this->_em->persist($product);
$this->_em->persist($product);
$this->_em->flush();
$product->setTitle("Test Change title");
$product->addBuyer($user2);
$product->setTitle("Test Change title");
$product->addBuyer($user2);
$this->_em->persist($product);
$this->_em->flush();
$this->_em->persist($product);
$this->_em->flush();
$expect = array(
$expect = array(
'title' => array(
0 => 'Test product',
1 => 'Test Change title',
),
);
0 => 'Test product',
1 => 'Test Change title',
),
);
$this->assertEquals(print_r($expect, true), print_r($product->changeSet, true));
$this->assertEquals(print_r($expect, true), print_r($product->changeSet, true));
}
}
@ -160,7 +160,7 @@ class DDC3033Product
$entity = $eventArgs->getEntity();
$classMetadata = $em->getClassMetadata(get_class($entity));
$uow->computeChangeSet($classMetadata, $entity);
$uow->computeChangeSet($classMetadata, $entity);
$this->changeSet = $uow->getEntityChangeSet($entity);
}
}