Add the correct assertions for tests that don't have any
This commit is contained in:
parent
d8663cd9ee
commit
8dccd27b52
@ -47,6 +47,8 @@ class CascadeRemoveOrderTest extends OrmFunctionalTestCase
|
||||
|
||||
$this->_em->remove($eOloaded);
|
||||
$this->_em->flush();
|
||||
|
||||
self::assertNull($this->_em->find(CascadeRemoveOrderEntityG::class, $eG->getId()));
|
||||
}
|
||||
|
||||
public function testMany()
|
||||
@ -66,6 +68,10 @@ class CascadeRemoveOrderTest extends OrmFunctionalTestCase
|
||||
|
||||
$this->_em->remove($eOloaded);
|
||||
$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()));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -325,6 +325,8 @@ class NativeQueryTest extends OrmFunctionalTestCase
|
||||
{
|
||||
$rsm = new ResultSetMappingBuilder($this->_em);
|
||||
$rsm->addRootEntityFromClassMetadata(CompanyFixContract::class, 'c');
|
||||
|
||||
self::assertSame(CompanyFixContract::class, $rsm->getClassName('c'));
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -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')
|
||||
->setParameters($parameters)
|
||||
->getResult();
|
||||
|
||||
$extractValue = function (Parameter $parameter) {
|
||||
return $parameter->getValue();
|
||||
};
|
||||
|
||||
self::assertSame(
|
||||
$parameters->map($extractValue)->toArray(),
|
||||
$this->_sqlLoggerStack->queries[$this->_sqlLoggerStack->currentQuery]['params']
|
||||
);
|
||||
}
|
||||
|
||||
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')
|
||||
->setParameters([1 => 'jwage', 2 => 'active'])
|
||||
->setParameters($parameters)
|
||||
->getResult();
|
||||
|
||||
self::assertSame(
|
||||
array_values($parameters),
|
||||
$this->_sqlLoggerStack->queries[$this->_sqlLoggerStack->currentQuery]['params']
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -30,12 +30,13 @@ class SequenceGeneratorTest extends OrmFunctionalTestCase
|
||||
|
||||
public function testHighAllocationSizeSequence()
|
||||
{
|
||||
for ($i = 0; $i < 11; $i++) {
|
||||
$e = new SequenceEntity();
|
||||
$this->_em->persist($e);
|
||||
for ($i = 0; $i < 11; ++$i) {
|
||||
$this->_em->persist(new SequenceEntity());
|
||||
}
|
||||
|
||||
$this->_em->flush();
|
||||
|
||||
self::assertCount(11, $this->_em->getRepository(SequenceEntity::class)->findAll());
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -42,8 +42,11 @@ class DDC1113Test extends \Doctrine\Tests\OrmFunctionalTestCase
|
||||
$this->_em->remove($bus);
|
||||
$this->_em->remove($car);
|
||||
$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());
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -275,6 +275,8 @@ class DDC117Test extends \Doctrine\Tests\OrmFunctionalTestCase
|
||||
|
||||
$this->_em->persist($this->article1);
|
||||
$this->_em->flush();
|
||||
|
||||
self::assertSame($this->articleDetails, $this->_em->find(DDC117ArticleDetails::class, $this->article1));
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -47,6 +47,8 @@ class DDC1181Test extends OrmFunctionalTestCase
|
||||
|
||||
$this->_em->remove($hotel);
|
||||
$this->_em->flush();
|
||||
|
||||
self::assertEmpty($this->_em->getRepository(DDC1181Booking::class)->findAll());
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -26,8 +26,12 @@ class DDC1209Test extends OrmFunctionalTestCase
|
||||
*/
|
||||
public function testIdentifierCanHaveCustomType()
|
||||
{
|
||||
$this->_em->persist(new DDC1209_3());
|
||||
$entity = new DDC1209_3();
|
||||
|
||||
$this->_em->persist($entity);
|
||||
$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()
|
||||
{
|
||||
$future1 = new DDC1209_1();
|
||||
$this->_em->persist($future1);
|
||||
|
||||
$this->_em->persist($future1);
|
||||
$this->_em->flush();
|
||||
|
||||
$future2 = new DDC1209_2($future1);
|
||||
$this->_em->persist($future2);
|
||||
|
||||
$this->_em->persist($future2);
|
||||
$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
|
||||
* @Column(type="datetime", nullable=false)
|
||||
*/
|
||||
private $starting_datetime;
|
||||
public $starting_datetime;
|
||||
|
||||
/**
|
||||
* @Id
|
||||
* @Column(type="datetime", nullable=false)
|
||||
*/
|
||||
private $during_datetime;
|
||||
public $during_datetime;
|
||||
|
||||
/**
|
||||
* @Id
|
||||
* @Column(type="datetime", nullable=false)
|
||||
*/
|
||||
private $ending_datetime;
|
||||
public $ending_datetime;
|
||||
|
||||
public function __construct(DDC1209_1 $future1)
|
||||
{
|
||||
@ -108,7 +127,7 @@ class DDC1209_3
|
||||
* @Id
|
||||
* @Column(type="datetime", name="somedate")
|
||||
*/
|
||||
private $date;
|
||||
public $date;
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
|
@ -48,5 +48,8 @@ class DDC1306Test extends \Doctrine\Tests\OrmFunctionalTestCase
|
||||
$this->_em->remove($user->getAddress());
|
||||
$this->_em->remove($user);
|
||||
$this->_em->flush();
|
||||
|
||||
self::assertEmpty($this->_em->getRepository(CmsAddress::class)->findAll());
|
||||
self::assertEmpty($this->_em->getRepository(CmsUser::class)->findAll());
|
||||
}
|
||||
}
|
||||
|
@ -57,7 +57,11 @@ class DDC1400Test extends \Doctrine\Tests\OrmFunctionalTestCase
|
||||
->setParameter('activeUser', $user1)
|
||||
->getResult();
|
||||
|
||||
$queryCount = $this->getCurrentQueryCount();
|
||||
|
||||
$this->_em->flush();
|
||||
|
||||
self::assertSame($queryCount, $this->getCurrentQueryCount(), 'No query should be executed during flush in this case');
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -30,6 +30,7 @@ class DDC144Test extends OrmFunctionalTestCase
|
||||
$this->_em->persist($operand);
|
||||
$this->_em->flush();
|
||||
|
||||
self::assertSame($operand, $this->_em->find(DDC144Operand::class, $operand->id));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -2,6 +2,8 @@
|
||||
|
||||
namespace Doctrine\Tests\ORM\Functional\Ticket;
|
||||
|
||||
use Doctrine\ORM\UnitOfWork;
|
||||
|
||||
/**
|
||||
* @group DDC-1454
|
||||
*/
|
||||
@ -25,9 +27,9 @@ class DDC1454Test extends \Doctrine\Tests\OrmFunctionalTestCase
|
||||
public function testFailingCase()
|
||||
{
|
||||
$pic = new DDC1454Picture();
|
||||
$this->_em->getUnitOfWork()->getEntityState($pic);
|
||||
}
|
||||
|
||||
self::assertSame(UnitOfWork::STATE_NEW, $this->_em->getUnitOfWork()->getEntityState($pic));
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -36,6 +36,12 @@ class DDC1925Test extends \Doctrine\Tests\OrmFunctionalTestCase
|
||||
|
||||
$this->_em->persist($product);
|
||||
$this->_em->flush();
|
||||
$this->_em->clear();
|
||||
|
||||
/** @var DDC1925Product $persistedProduct */
|
||||
$persistedProduct = $this->_em->find(DDC1925Product::class, $product->getId());
|
||||
|
||||
self::assertEquals($user, $persistedProduct->getBuyers()->first());
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -2,6 +2,7 @@
|
||||
|
||||
namespace Doctrine\Tests\ORM\Functional\Ticket;
|
||||
|
||||
use Doctrine\ORM\Mapping\ClassMetadata;
|
||||
use Doctrine\Tests\OrmFunctionalTestCase;
|
||||
|
||||
/**
|
||||
@ -11,12 +12,21 @@ class DDC192Test extends OrmFunctionalTestCase
|
||||
{
|
||||
public function testSchemaCreation()
|
||||
{
|
||||
$this->_schemaTool->createSchema(
|
||||
[
|
||||
$this->_em->getClassMetadata(DDC192User::class),
|
||||
$this->_em->getClassMetadata(DDC192Phonenumber::class)
|
||||
]
|
||||
);
|
||||
$classes = [
|
||||
$this->_em->getClassMetadata(DDC192User::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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -34,7 +34,8 @@ class DDC2106Test extends \Doctrine\Tests\OrmFunctionalTestCase
|
||||
$this->_em->persist($entityWithoutId);
|
||||
|
||||
$criteria = Criteria::create()->where(Criteria::expr()->eq('parent', $entityWithoutId));
|
||||
$entity->children->matching($criteria)->count();
|
||||
|
||||
self::assertCount(0, $entity->children->matching($criteria));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -51,14 +51,14 @@ class DDC2256Test extends \Doctrine\Tests\OrmFunctionalTestCase
|
||||
$rsm->addFieldResult('g', 'group_id', 'id');
|
||||
$rsm->addFieldResult('g', 'group_name', 'name');
|
||||
|
||||
$this->_em->createNativeQuery($sql, $rsm)->getResult();
|
||||
self::assertCount(1, $this->_em->createNativeQuery($sql, $rsm)->getResult());
|
||||
|
||||
// Test ResultSetMappingBuilder.
|
||||
$rsm = new ResultSetMappingBuilder($this->_em);
|
||||
$rsm->addRootEntityFromClassMetadata('MyNamespace:DDC2256User', 'u');
|
||||
$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());
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -49,6 +49,8 @@ class DDC2775Test extends OrmFunctionalTestCase
|
||||
$this->_em->remove($user);
|
||||
$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
|
||||
$this->_em->flush();
|
||||
}
|
||||
|
@ -46,17 +46,23 @@ class DDC3170Test extends \Doctrine\Tests\OrmFunctionalTestCase
|
||||
$this->_em->flush();
|
||||
$this->_em->clear();
|
||||
|
||||
$this->_em->createQueryBuilder()
|
||||
$result = $this->_em->createQueryBuilder()
|
||||
->select('p')
|
||||
->from(DDC3170ProductJoined::class, 'p')
|
||||
->getQuery()
|
||||
->getResult(AbstractQuery::HYDRATE_SIMPLEOBJECT);
|
||||
|
||||
$this->_em->createQueryBuilder()
|
||||
self::assertCount(1, $result);
|
||||
self::assertContainsOnly(DDC3170ProductJoined::class, $result);
|
||||
|
||||
$result = $this->_em->createQueryBuilder()
|
||||
->select('p')
|
||||
->from(DDC3170ProductSingleTable::class, 'p')
|
||||
->getQuery()
|
||||
->getResult(AbstractQuery::HYDRATE_SIMPLEOBJECT);
|
||||
|
||||
self::assertCount(1, $result);
|
||||
self::assertContainsOnly(DDC3170ProductSingleTable::class, $result);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -44,8 +44,13 @@ class DDC3785Test extends \Doctrine\Tests\OrmFunctionalTestCase
|
||||
$asset->getAttributes()
|
||||
->removeElement($attribute1);
|
||||
|
||||
$idToBeRemoved = $attribute1->id;
|
||||
|
||||
$this->_em->persist($asset);
|
||||
$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")
|
||||
* @GeneratedValue
|
||||
*/
|
||||
private $id;
|
||||
public $id;
|
||||
|
||||
/** @Column(type = "string") */
|
||||
private $name;
|
||||
|
@ -78,7 +78,11 @@ class DDC522Test extends \Doctrine\Tests\OrmFunctionalTestCase
|
||||
$this->_em->flush();
|
||||
$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));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -50,6 +50,9 @@ class DDC832Test extends \Doctrine\Tests\OrmFunctionalTestCase
|
||||
|
||||
$like->word = 'test2';
|
||||
$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->flush();
|
||||
|
||||
$idToBeRemoved = $like->id;
|
||||
|
||||
$this->_em->remove($like);
|
||||
$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';
|
||||
$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->flush();
|
||||
|
||||
$idToBeRemoved = $index->id;
|
||||
|
||||
$this->_em->remove($index);
|
||||
$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';
|
||||
$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->flush();
|
||||
|
||||
$idToBeRemoved = $index->id;
|
||||
|
||||
$this->_em->remove($index);
|
||||
$this->_em->flush();
|
||||
$this->_em->clear();
|
||||
|
||||
self::assertNull($this->_em->find(DDC832JoinedTreeIndex::class, $idToBeRemoved));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -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')
|
||||
->setParameter(1, $date, DBALType::DATETIME)
|
||||
->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()
|
||||
@ -164,6 +167,9 @@ class TypeTest extends OrmFunctionalTestCase
|
||||
->where('d.datetime = ?1')
|
||||
->setParameter(1, $date, DBALType::DATETIME)
|
||||
->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()
|
||||
|
@ -66,7 +66,7 @@ class ScalarHydratorTest extends HydrationTestCase
|
||||
$stmt = new HydratorMockStatement($resultSet);
|
||||
$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);
|
||||
$hydrator = new ScalarHydrator($this->_em);
|
||||
|
||||
$result = $hydrator->hydrateAll($stmt, $rsm);
|
||||
self::assertCount(1, $hydrator->hydrateAll($stmt, $rsm));
|
||||
}
|
||||
}
|
||||
|
@ -221,10 +221,11 @@ class AnnotationDriverTest extends AbstractMappingDriverTest
|
||||
|
||||
$em = $this->_getTestEntityManager();
|
||||
$em->getConfiguration()->setMetadataDriverImpl($annotationDriver);
|
||||
|
||||
$factory = new ClassMetadataFactory();
|
||||
$factory->setEntityManager($em);
|
||||
|
||||
$cm = $factory->getMetadataFor(ChildEntity::class);
|
||||
self::assertInstanceOf(ClassMetadata::class, $factory->getMetadataFor(ChildEntity::class));
|
||||
}
|
||||
|
||||
public function testInvalidFetchOptionThrowsException()
|
||||
|
@ -32,7 +32,7 @@ class PHPMappingDriverTest extends AbstractMappingDriverTest
|
||||
*/
|
||||
public function testinvalidEntityOrMappedSuperClassShouldMentionParentClasses()
|
||||
{
|
||||
$this->createClassMetadata(DDC889Class::class);
|
||||
self::assertInstanceOf(ClassMetadata::class, $this->createClassMetadata(DDC889Class::class));
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -3,6 +3,7 @@
|
||||
namespace Doctrine\Tests\ORM\Mapping;
|
||||
|
||||
use Doctrine\Common\Persistence\Mapping\Driver\StaticPHPDriver;
|
||||
use Doctrine\ORM\Mapping\ClassMetadata;
|
||||
use Doctrine\Tests\Models\DDC889\DDC889Class;
|
||||
|
||||
class StaticPHPMappingDriverTest extends AbstractMappingDriverTest
|
||||
@ -19,7 +20,7 @@ class StaticPHPMappingDriverTest extends AbstractMappingDriverTest
|
||||
*/
|
||||
public function testinvalidEntityOrMappedSuperClassShouldMentionParentClasses()
|
||||
{
|
||||
$this->createClassMetadata(DDC889Class::class);
|
||||
self::assertInstanceOf(ClassMetadata::class, $this->createClassMetadata(DDC889Class::class));
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -6,6 +6,7 @@ use Doctrine\Common\Cache\ArrayCache;
|
||||
use Doctrine\Common\Collections\ArrayCollection;
|
||||
|
||||
use Doctrine\ORM\EntityManager;
|
||||
use Doctrine\ORM\Internal\Hydration\IterableResult;
|
||||
use Doctrine\ORM\Query\Parameter;
|
||||
use Doctrine\Tests\Mocks\DriverConnectionMock;
|
||||
use Doctrine\Tests\Mocks\StatementArrayMock;
|
||||
@ -147,7 +148,8 @@ class QueryTest extends OrmTestCase
|
||||
public function testIterateWithDistinct()
|
||||
{
|
||||
$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());
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -33,7 +33,7 @@ class SchemaValidatorTest extends OrmTestCase
|
||||
->getMetadataDriverImpl()
|
||||
->addPaths([$path]);
|
||||
|
||||
$this->validator->validateMapping();
|
||||
self::assertEmpty($this->validator->validateMapping());
|
||||
}
|
||||
|
||||
public function modelSetProvider(): array
|
||||
|
@ -248,8 +248,12 @@ class UnitOfWorkTest extends OrmTestCase
|
||||
// Schedule user for update without changes
|
||||
$this->_unitOfWork->scheduleForUpdate($user);
|
||||
|
||||
self::assertNotEmpty($this->_unitOfWork->getScheduledEntityUpdates());
|
||||
|
||||
// This commit should not raise an E_NOTICE
|
||||
$this->_unitOfWork->commit();
|
||||
|
||||
self::assertEmpty($this->_unitOfWork->getScheduledEntityUpdates());
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
x
Reference in New Issue
Block a user