1
0
mirror of synced 2025-02-03 05:49:25 +03:00

Add the correct assertions for tests that don't have any

This commit is contained in:
Luís Cobucci 2017-05-31 16:36:31 +02:00
parent d8663cd9ee
commit 8dccd27b52
No known key found for this signature in database
GPG Key ID: EC61C5F01750ED3C
29 changed files with 167 additions and 34 deletions

View File

@ -47,6 +47,8 @@ class CascadeRemoveOrderTest extends OrmFunctionalTestCase
$this->_em->remove($eOloaded); $this->_em->remove($eOloaded);
$this->_em->flush(); $this->_em->flush();
self::assertNull($this->_em->find(CascadeRemoveOrderEntityG::class, $eG->getId()));
} }
public function testMany() public function testMany()
@ -66,6 +68,10 @@ class CascadeRemoveOrderTest extends OrmFunctionalTestCase
$this->_em->remove($eOloaded); $this->_em->remove($eOloaded);
$this->_em->flush(); $this->_em->flush();
self::assertNull($this->_em->find(CascadeRemoveOrderEntityG::class, $eG1->getId()));
self::assertNull($this->_em->find(CascadeRemoveOrderEntityG::class, $eG2->getId()));
self::assertNull($this->_em->find(CascadeRemoveOrderEntityG::class, $eG3->getId()));
} }
} }

View File

@ -325,6 +325,8 @@ class NativeQueryTest extends OrmFunctionalTestCase
{ {
$rsm = new ResultSetMappingBuilder($this->_em); $rsm = new ResultSetMappingBuilder($this->_em);
$rsm->addRootEntityFromClassMetadata(CompanyFixContract::class, 'c'); $rsm->addRootEntityFromClassMetadata(CompanyFixContract::class, 'c');
self::assertSame(CompanyFixContract::class, $rsm->getClassName('c'));
} }
/** /**

View File

@ -169,13 +169,29 @@ class QueryTest extends OrmFunctionalTestCase
$this->_em->createQuery('SELECT u FROM ' . CmsUser::class . ' u WHERE u.name = ?1 AND u.status = ?2') $this->_em->createQuery('SELECT u FROM ' . CmsUser::class . ' u WHERE u.name = ?1 AND u.status = ?2')
->setParameters($parameters) ->setParameters($parameters)
->getResult(); ->getResult();
$extractValue = function (Parameter $parameter) {
return $parameter->getValue();
};
self::assertSame(
$parameters->map($extractValue)->toArray(),
$this->_sqlLoggerStack->queries[$this->_sqlLoggerStack->currentQuery]['params']
);
} }
public function testSetParametersBackwardsCompatible() public function testSetParametersBackwardsCompatible()
{ {
$parameters = [1 => 'jwage', 2 => 'active'];
$this->_em->createQuery('SELECT u FROM ' . CmsUser::class . ' u WHERE u.name = ?1 AND u.status = ?2') $this->_em->createQuery('SELECT u FROM ' . CmsUser::class . ' u WHERE u.name = ?1 AND u.status = ?2')
->setParameters([1 => 'jwage', 2 => 'active']) ->setParameters($parameters)
->getResult(); ->getResult();
self::assertSame(
array_values($parameters),
$this->_sqlLoggerStack->queries[$this->_sqlLoggerStack->currentQuery]['params']
);
} }
/** /**

View File

@ -30,12 +30,13 @@ class SequenceGeneratorTest extends OrmFunctionalTestCase
public function testHighAllocationSizeSequence() public function testHighAllocationSizeSequence()
{ {
for ($i = 0; $i < 11; $i++) { for ($i = 0; $i < 11; ++$i) {
$e = new SequenceEntity(); $this->_em->persist(new SequenceEntity());
$this->_em->persist($e);
} }
$this->_em->flush(); $this->_em->flush();
self::assertCount(11, $this->_em->getRepository(SequenceEntity::class)->findAll());
} }
} }

View File

@ -42,8 +42,11 @@ class DDC1113Test extends \Doctrine\Tests\OrmFunctionalTestCase
$this->_em->remove($bus); $this->_em->remove($bus);
$this->_em->remove($car); $this->_em->remove($car);
$this->_em->flush(); $this->_em->flush();
}
self::assertEmpty($this->_em->getRepository(DDC1113Car::class)->findAll());
self::assertEmpty($this->_em->getRepository(DDC1113Bus::class)->findAll());
self::assertEmpty($this->_em->getRepository(DDC1113Engine::class)->findAll());
}
} }
/** /**

View File

@ -275,6 +275,8 @@ class DDC117Test extends \Doctrine\Tests\OrmFunctionalTestCase
$this->_em->persist($this->article1); $this->_em->persist($this->article1);
$this->_em->flush(); $this->_em->flush();
self::assertSame($this->articleDetails, $this->_em->find(DDC117ArticleDetails::class, $this->article1));
} }
/** /**

View File

@ -47,6 +47,8 @@ class DDC1181Test extends OrmFunctionalTestCase
$this->_em->remove($hotel); $this->_em->remove($hotel);
$this->_em->flush(); $this->_em->flush();
self::assertEmpty($this->_em->getRepository(DDC1181Booking::class)->findAll());
} }
} }

View File

@ -26,8 +26,12 @@ class DDC1209Test extends OrmFunctionalTestCase
*/ */
public function testIdentifierCanHaveCustomType() public function testIdentifierCanHaveCustomType()
{ {
$this->_em->persist(new DDC1209_3()); $entity = new DDC1209_3();
$this->_em->persist($entity);
$this->_em->flush(); $this->_em->flush();
self::assertSame($entity, $this->_em->find(DDC1209_3::class, $entity->date));
} }
/** /**
@ -36,14 +40,27 @@ class DDC1209Test extends OrmFunctionalTestCase
public function testCompositeIdentifierCanHaveCustomType() public function testCompositeIdentifierCanHaveCustomType()
{ {
$future1 = new DDC1209_1(); $future1 = new DDC1209_1();
$this->_em->persist($future1);
$this->_em->persist($future1);
$this->_em->flush(); $this->_em->flush();
$future2 = new DDC1209_2($future1); $future2 = new DDC1209_2($future1);
$this->_em->persist($future2);
$this->_em->persist($future2);
$this->_em->flush(); $this->_em->flush();
self::assertSame(
$future2,
$this->_em->find(
DDC1209_2::class,
[
'future1' => $future1,
'starting_datetime' => $future2->starting_datetime,
'during_datetime' => $future2->during_datetime,
'ending_datetime' => $future2->ending_datetime,
]
)
);
} }
} }
@ -78,17 +95,19 @@ class DDC1209_2
* @Id * @Id
* @Column(type="datetime", nullable=false) * @Column(type="datetime", nullable=false)
*/ */
private $starting_datetime; public $starting_datetime;
/** /**
* @Id * @Id
* @Column(type="datetime", nullable=false) * @Column(type="datetime", nullable=false)
*/ */
private $during_datetime; public $during_datetime;
/** /**
* @Id * @Id
* @Column(type="datetime", nullable=false) * @Column(type="datetime", nullable=false)
*/ */
private $ending_datetime; public $ending_datetime;
public function __construct(DDC1209_1 $future1) public function __construct(DDC1209_1 $future1)
{ {
@ -108,7 +127,7 @@ class DDC1209_3
* @Id * @Id
* @Column(type="datetime", name="somedate") * @Column(type="datetime", name="somedate")
*/ */
private $date; public $date;
public function __construct() public function __construct()
{ {

View File

@ -48,5 +48,8 @@ class DDC1306Test extends \Doctrine\Tests\OrmFunctionalTestCase
$this->_em->remove($user->getAddress()); $this->_em->remove($user->getAddress());
$this->_em->remove($user); $this->_em->remove($user);
$this->_em->flush(); $this->_em->flush();
self::assertEmpty($this->_em->getRepository(CmsAddress::class)->findAll());
self::assertEmpty($this->_em->getRepository(CmsUser::class)->findAll());
} }
} }

View File

@ -57,7 +57,11 @@ class DDC1400Test extends \Doctrine\Tests\OrmFunctionalTestCase
->setParameter('activeUser', $user1) ->setParameter('activeUser', $user1)
->getResult(); ->getResult();
$queryCount = $this->getCurrentQueryCount();
$this->_em->flush(); $this->_em->flush();
self::assertSame($queryCount, $this->getCurrentQueryCount(), 'No query should be executed during flush in this case');
} }
} }

View File

@ -30,6 +30,7 @@ class DDC144Test extends OrmFunctionalTestCase
$this->_em->persist($operand); $this->_em->persist($operand);
$this->_em->flush(); $this->_em->flush();
self::assertSame($operand, $this->_em->find(DDC144Operand::class, $operand->id));
} }
} }

View File

@ -2,6 +2,8 @@
namespace Doctrine\Tests\ORM\Functional\Ticket; namespace Doctrine\Tests\ORM\Functional\Ticket;
use Doctrine\ORM\UnitOfWork;
/** /**
* @group DDC-1454 * @group DDC-1454
*/ */
@ -25,9 +27,9 @@ class DDC1454Test extends \Doctrine\Tests\OrmFunctionalTestCase
public function testFailingCase() public function testFailingCase()
{ {
$pic = new DDC1454Picture(); $pic = new DDC1454Picture();
$this->_em->getUnitOfWork()->getEntityState($pic);
}
self::assertSame(UnitOfWork::STATE_NEW, $this->_em->getUnitOfWork()->getEntityState($pic));
}
} }
/** /**

View File

@ -36,6 +36,12 @@ class DDC1925Test extends \Doctrine\Tests\OrmFunctionalTestCase
$this->_em->persist($product); $this->_em->persist($product);
$this->_em->flush(); $this->_em->flush();
$this->_em->clear();
/** @var DDC1925Product $persistedProduct */
$persistedProduct = $this->_em->find(DDC1925Product::class, $product->getId());
self::assertEquals($user, $persistedProduct->getBuyers()->first());
} }
} }

View File

@ -2,6 +2,7 @@
namespace Doctrine\Tests\ORM\Functional\Ticket; namespace Doctrine\Tests\ORM\Functional\Ticket;
use Doctrine\ORM\Mapping\ClassMetadata;
use Doctrine\Tests\OrmFunctionalTestCase; use Doctrine\Tests\OrmFunctionalTestCase;
/** /**
@ -11,12 +12,21 @@ class DDC192Test extends OrmFunctionalTestCase
{ {
public function testSchemaCreation() public function testSchemaCreation()
{ {
$this->_schemaTool->createSchema( $classes = [
[
$this->_em->getClassMetadata(DDC192User::class), $this->_em->getClassMetadata(DDC192User::class),
$this->_em->getClassMetadata(DDC192Phonenumber::class) $this->_em->getClassMetadata(DDC192Phonenumber::class),
] ];
);
$this->_schemaTool->createSchema($classes);
$tables = $this->_em->getConnection()
->getSchemaManager()
->listTableNames();
/** @var ClassMetadata $class */
foreach ($classes as $class) {
self::assertContains($class->getTableName(), $tables);
}
} }
} }

View File

@ -34,7 +34,8 @@ class DDC2106Test extends \Doctrine\Tests\OrmFunctionalTestCase
$this->_em->persist($entityWithoutId); $this->_em->persist($entityWithoutId);
$criteria = Criteria::create()->where(Criteria::expr()->eq('parent', $entityWithoutId)); $criteria = Criteria::create()->where(Criteria::expr()->eq('parent', $entityWithoutId));
$entity->children->matching($criteria)->count();
self::assertCount(0, $entity->children->matching($criteria));
} }
} }

View File

@ -51,14 +51,14 @@ class DDC2256Test extends \Doctrine\Tests\OrmFunctionalTestCase
$rsm->addFieldResult('g', 'group_id', 'id'); $rsm->addFieldResult('g', 'group_id', 'id');
$rsm->addFieldResult('g', 'group_name', 'name'); $rsm->addFieldResult('g', 'group_name', 'name');
$this->_em->createNativeQuery($sql, $rsm)->getResult(); self::assertCount(1, $this->_em->createNativeQuery($sql, $rsm)->getResult());
// Test ResultSetMappingBuilder. // Test ResultSetMappingBuilder.
$rsm = new ResultSetMappingBuilder($this->_em); $rsm = new ResultSetMappingBuilder($this->_em);
$rsm->addRootEntityFromClassMetadata('MyNamespace:DDC2256User', 'u'); $rsm->addRootEntityFromClassMetadata('MyNamespace:DDC2256User', 'u');
$rsm->addJoinedEntityFromClassMetadata('MyNamespace:DDC2256Group', 'g', 'u', 'group', ['id' => 'group_id', 'name' => 'group_name']); $rsm->addJoinedEntityFromClassMetadata('MyNamespace:DDC2256Group', 'g', 'u', 'group', ['id' => 'group_id', 'name' => 'group_name']);
$this->_em->createNativeQuery($sql, $rsm)->getResult(); self::assertCount(1, $this->_em->createNativeQuery($sql, $rsm)->getResult());
} }
} }

View File

@ -49,6 +49,8 @@ class DDC2775Test extends OrmFunctionalTestCase
$this->_em->remove($user); $this->_em->remove($user);
$this->_em->flush(); $this->_em->flush();
self::assertEmpty($this->_em->getRepository(Authorization::class)->findAll());
// With the bug, the second flush throws an error because the cascade remove didn't work correctly // With the bug, the second flush throws an error because the cascade remove didn't work correctly
$this->_em->flush(); $this->_em->flush();
} }

View File

@ -46,17 +46,23 @@ class DDC3170Test extends \Doctrine\Tests\OrmFunctionalTestCase
$this->_em->flush(); $this->_em->flush();
$this->_em->clear(); $this->_em->clear();
$this->_em->createQueryBuilder() $result = $this->_em->createQueryBuilder()
->select('p') ->select('p')
->from(DDC3170ProductJoined::class, 'p') ->from(DDC3170ProductJoined::class, 'p')
->getQuery() ->getQuery()
->getResult(AbstractQuery::HYDRATE_SIMPLEOBJECT); ->getResult(AbstractQuery::HYDRATE_SIMPLEOBJECT);
$this->_em->createQueryBuilder() self::assertCount(1, $result);
self::assertContainsOnly(DDC3170ProductJoined::class, $result);
$result = $this->_em->createQueryBuilder()
->select('p') ->select('p')
->from(DDC3170ProductSingleTable::class, 'p') ->from(DDC3170ProductSingleTable::class, 'p')
->getQuery() ->getQuery()
->getResult(AbstractQuery::HYDRATE_SIMPLEOBJECT); ->getResult(AbstractQuery::HYDRATE_SIMPLEOBJECT);
self::assertCount(1, $result);
self::assertContainsOnly(DDC3170ProductSingleTable::class, $result);
} }
} }

View File

@ -44,8 +44,13 @@ class DDC3785Test extends \Doctrine\Tests\OrmFunctionalTestCase
$asset->getAttributes() $asset->getAttributes()
->removeElement($attribute1); ->removeElement($attribute1);
$idToBeRemoved = $attribute1->id;
$this->_em->persist($asset); $this->_em->persist($asset);
$this->_em->flush(); $this->_em->flush();
self::assertNull($this->_em->find(DDC3785_Attribute::class, $idToBeRemoved));
self::assertNotNull($this->_em->find(DDC3785_Attribute::class, $attribute2->id));
} }
} }
@ -100,7 +105,7 @@ class DDC3785_Attribute
* @Id @Column(type="integer") * @Id @Column(type="integer")
* @GeneratedValue * @GeneratedValue
*/ */
private $id; public $id;
/** @Column(type = "string") */ /** @Column(type = "string") */
private $name; private $name;

View File

@ -78,7 +78,11 @@ class DDC522Test extends \Doctrine\Tests\OrmFunctionalTestCase
$this->_em->flush(); $this->_em->flush();
$this->_em->clear(); $this->_em->clear();
$newCust = $this->_em->find(get_class($fkCust), $fkCust->id); $expected = clone $fkCust;
// removing dynamic field (which is not persisted)
unset($expected->name);
self::assertEquals($expected, $this->_em->find(DDC522ForeignKeyTest::class, $fkCust->id));
} }
} }

View File

@ -50,6 +50,9 @@ class DDC832Test extends \Doctrine\Tests\OrmFunctionalTestCase
$like->word = 'test2'; $like->word = 'test2';
$this->_em->flush(); $this->_em->flush();
$this->_em->clear();
self::assertEquals($like, $this->_em->find(DDC832Like::class, $like->id));
} }
/** /**
@ -61,8 +64,13 @@ class DDC832Test extends \Doctrine\Tests\OrmFunctionalTestCase
$this->_em->persist($like); $this->_em->persist($like);
$this->_em->flush(); $this->_em->flush();
$idToBeRemoved = $like->id;
$this->_em->remove($like); $this->_em->remove($like);
$this->_em->flush(); $this->_em->flush();
$this->_em->clear();
self::assertNull($this->_em->find(DDC832Like::class, $idToBeRemoved));
} }
/** /**
@ -76,6 +84,9 @@ class DDC832Test extends \Doctrine\Tests\OrmFunctionalTestCase
$index->name = 'asdf'; $index->name = 'asdf';
$this->_em->flush(); $this->_em->flush();
$this->_em->clear();
self::assertEquals($index, $this->_em->find(DDC832JoinedIndex::class, $index->id));
} }
/** /**
@ -87,8 +98,13 @@ class DDC832Test extends \Doctrine\Tests\OrmFunctionalTestCase
$this->_em->persist($index); $this->_em->persist($index);
$this->_em->flush(); $this->_em->flush();
$idToBeRemoved = $index->id;
$this->_em->remove($index); $this->_em->remove($index);
$this->_em->flush(); $this->_em->flush();
$this->_em->clear();
self::assertNull($this->_em->find(DDC832JoinedIndex::class, $idToBeRemoved));
} }
/** /**
@ -102,6 +118,9 @@ class DDC832Test extends \Doctrine\Tests\OrmFunctionalTestCase
$index->name = 'asdf'; $index->name = 'asdf';
$this->_em->flush(); $this->_em->flush();
$this->_em->clear();
self::assertEquals($index, $this->_em->find(DDC832JoinedTreeIndex::class, $index->id));
} }
/** /**
@ -113,8 +132,13 @@ class DDC832Test extends \Doctrine\Tests\OrmFunctionalTestCase
$this->_em->persist($index); $this->_em->persist($index);
$this->_em->flush(); $this->_em->flush();
$idToBeRemoved = $index->id;
$this->_em->remove($index); $this->_em->remove($index);
$this->_em->flush(); $this->_em->flush();
$this->_em->clear();
self::assertNull($this->_em->find(DDC832JoinedTreeIndex::class, $idToBeRemoved));
} }
} }

View File

@ -145,6 +145,9 @@ class TypeTest extends OrmFunctionalTestCase
$dateTimeDb = $this->_em->createQuery('SELECT d FROM Doctrine\Tests\Models\Generic\DateTimeModel d WHERE d.datetime = ?1') $dateTimeDb = $this->_em->createQuery('SELECT d FROM Doctrine\Tests\Models\Generic\DateTimeModel d WHERE d.datetime = ?1')
->setParameter(1, $date, DBALType::DATETIME) ->setParameter(1, $date, DBALType::DATETIME)
->getSingleResult(); ->getSingleResult();
$this->assertInstanceOf(\DateTime::class, $dateTimeDb->datetime);
$this->assertSame('2009-10-02 20:10:52', $dateTimeDb->datetime->format('Y-m-d H:i:s'));
} }
public function testDqlQueryBuilderBindDateTimeInstance() public function testDqlQueryBuilderBindDateTimeInstance()
@ -164,6 +167,9 @@ class TypeTest extends OrmFunctionalTestCase
->where('d.datetime = ?1') ->where('d.datetime = ?1')
->setParameter(1, $date, DBALType::DATETIME) ->setParameter(1, $date, DBALType::DATETIME)
->getQuery()->getSingleResult(); ->getQuery()->getSingleResult();
$this->assertInstanceOf(\DateTime::class, $dateTimeDb->datetime);
$this->assertSame('2009-10-02 20:10:52', $dateTimeDb->datetime->format('Y-m-d H:i:s'));
} }
public function testTime() public function testTime()

View File

@ -66,7 +66,7 @@ class ScalarHydratorTest extends HydrationTestCase
$stmt = new HydratorMockStatement($resultSet); $stmt = new HydratorMockStatement($resultSet);
$hydrator = new ScalarHydrator($this->_em); $hydrator = new ScalarHydrator($this->_em);
$result = $hydrator->hydrateAll($stmt, $rsm); self::assertCount(1, $hydrator->hydrateAll($stmt, $rsm));
} }
/** /**
@ -96,6 +96,6 @@ class ScalarHydratorTest extends HydrationTestCase
$stmt = new HydratorMockStatement($resultSet); $stmt = new HydratorMockStatement($resultSet);
$hydrator = new ScalarHydrator($this->_em); $hydrator = new ScalarHydrator($this->_em);
$result = $hydrator->hydrateAll($stmt, $rsm); self::assertCount(1, $hydrator->hydrateAll($stmt, $rsm));
} }
} }

View File

@ -221,10 +221,11 @@ class AnnotationDriverTest extends AbstractMappingDriverTest
$em = $this->_getTestEntityManager(); $em = $this->_getTestEntityManager();
$em->getConfiguration()->setMetadataDriverImpl($annotationDriver); $em->getConfiguration()->setMetadataDriverImpl($annotationDriver);
$factory = new ClassMetadataFactory(); $factory = new ClassMetadataFactory();
$factory->setEntityManager($em); $factory->setEntityManager($em);
$cm = $factory->getMetadataFor(ChildEntity::class); self::assertInstanceOf(ClassMetadata::class, $factory->getMetadataFor(ChildEntity::class));
} }
public function testInvalidFetchOptionThrowsException() public function testInvalidFetchOptionThrowsException()

View File

@ -32,7 +32,7 @@ class PHPMappingDriverTest extends AbstractMappingDriverTest
*/ */
public function testinvalidEntityOrMappedSuperClassShouldMentionParentClasses() public function testinvalidEntityOrMappedSuperClassShouldMentionParentClasses()
{ {
$this->createClassMetadata(DDC889Class::class); self::assertInstanceOf(ClassMetadata::class, $this->createClassMetadata(DDC889Class::class));
} }
/** /**

View File

@ -3,6 +3,7 @@
namespace Doctrine\Tests\ORM\Mapping; namespace Doctrine\Tests\ORM\Mapping;
use Doctrine\Common\Persistence\Mapping\Driver\StaticPHPDriver; use Doctrine\Common\Persistence\Mapping\Driver\StaticPHPDriver;
use Doctrine\ORM\Mapping\ClassMetadata;
use Doctrine\Tests\Models\DDC889\DDC889Class; use Doctrine\Tests\Models\DDC889\DDC889Class;
class StaticPHPMappingDriverTest extends AbstractMappingDriverTest class StaticPHPMappingDriverTest extends AbstractMappingDriverTest
@ -19,7 +20,7 @@ class StaticPHPMappingDriverTest extends AbstractMappingDriverTest
*/ */
public function testinvalidEntityOrMappedSuperClassShouldMentionParentClasses() public function testinvalidEntityOrMappedSuperClassShouldMentionParentClasses()
{ {
$this->createClassMetadata(DDC889Class::class); self::assertInstanceOf(ClassMetadata::class, $this->createClassMetadata(DDC889Class::class));
} }
/** /**

View File

@ -6,6 +6,7 @@ use Doctrine\Common\Cache\ArrayCache;
use Doctrine\Common\Collections\ArrayCollection; use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\ORM\EntityManager; use Doctrine\ORM\EntityManager;
use Doctrine\ORM\Internal\Hydration\IterableResult;
use Doctrine\ORM\Query\Parameter; use Doctrine\ORM\Query\Parameter;
use Doctrine\Tests\Mocks\DriverConnectionMock; use Doctrine\Tests\Mocks\DriverConnectionMock;
use Doctrine\Tests\Mocks\StatementArrayMock; use Doctrine\Tests\Mocks\StatementArrayMock;
@ -147,7 +148,8 @@ class QueryTest extends OrmTestCase
public function testIterateWithDistinct() public function testIterateWithDistinct()
{ {
$q = $this->_em->createQuery("SELECT DISTINCT u from Doctrine\Tests\Models\CMS\CmsUser u LEFT JOIN u.articles a"); $q = $this->_em->createQuery("SELECT DISTINCT u from Doctrine\Tests\Models\CMS\CmsUser u LEFT JOIN u.articles a");
$q->iterate();
self::assertInstanceOf(IterableResult::class, $q->iterate());
} }
/** /**

View File

@ -33,7 +33,7 @@ class SchemaValidatorTest extends OrmTestCase
->getMetadataDriverImpl() ->getMetadataDriverImpl()
->addPaths([$path]); ->addPaths([$path]);
$this->validator->validateMapping(); self::assertEmpty($this->validator->validateMapping());
} }
public function modelSetProvider(): array public function modelSetProvider(): array

View File

@ -248,8 +248,12 @@ class UnitOfWorkTest extends OrmTestCase
// Schedule user for update without changes // Schedule user for update without changes
$this->_unitOfWork->scheduleForUpdate($user); $this->_unitOfWork->scheduleForUpdate($user);
self::assertNotEmpty($this->_unitOfWork->getScheduledEntityUpdates());
// This commit should not raise an E_NOTICE // This commit should not raise an E_NOTICE
$this->_unitOfWork->commit(); $this->_unitOfWork->commit();
self::assertEmpty($this->_unitOfWork->getScheduledEntityUpdates());
} }
/** /**