1
0
mirror of synced 2025-02-02 21:41:45 +03:00

#6017 requesting clear('nonExistingEntityName') should raise a MappingException

This commit is contained in:
Marco Pivetta 2016-11-27 18:17:30 +01:00
parent 8f77afdc34
commit c1038096e0

View File

@ -4,6 +4,7 @@ namespace Doctrine\Tests\ORM;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\NotifyPropertyChanged;
use Doctrine\Common\Persistence\Mapping\MappingException;
use Doctrine\Common\PropertyChangedListener;
use Doctrine\ORM\Mapping\ClassMetadata;
use Doctrine\ORM\ORMInvalidArgumentException;
@ -362,6 +363,16 @@ class UnitOfWorkTest extends OrmTestCase
$this->_unitOfWork->clear($entity);
}
/**
* @group 6017
*/
public function testClearManagerWithUnknownEntityName()
{
$this->expectException(MappingException::class);
$this->_unitOfWork->clear(uniqid('nonExisting', true));
}
/**
* @group 6017
*/