1
0
mirror of synced 2024-12-05 03:06:05 +03:00

DDC-3427 - s/EntityManager/EntityManagerInterface in relevant tests about identifier generation

This commit is contained in:
Marco Pivetta 2014-12-05 15:50:21 +01:00
parent 6fc0d84b7a
commit dd8db1acd2
3 changed files with 8 additions and 6 deletions

View File

@ -2,7 +2,7 @@
namespace Doctrine\Tests\Mocks;
use Doctrine\ORM\EntityManager;
use Doctrine\ORM\EntityManagerInterface;
/**
* Mock class for SequenceGenerator.
@ -17,7 +17,7 @@ class SequenceMock extends \Doctrine\ORM\Id\SequenceGenerator
/**
* {@inheritdoc}
*/
public function generate(EntityManager $em, $entity)
public function generate(EntityManagerInterface $em, $entity)
{
return $this->_sequenceNumber++;
}

View File

@ -2,7 +2,7 @@
namespace Doctrine\Tests\ORM\Functional\Ticket;
use Doctrine\ORM\EntityManager;
use Doctrine\ORM\EntityManagerInterface;
use Doctrine\ORM\Id\AbstractIdGenerator;
use Doctrine\ORM\Mapping\ClassMetadataInfo;
use Doctrine\ORM\Mapping\Driver\StaticPHPDriver;
@ -97,7 +97,7 @@ class DDC2415ChildEntity extends DDC2415ParentEntity
class DDC2415Generator extends AbstractIdGenerator
{
public function generate(EntityManager $em, $entity)
public function generate(EntityManagerInterface $em, $entity)
{
return md5($entity->getName());
}

View File

@ -10,6 +10,8 @@ use Doctrine\Tests\Mocks\ConnectionMock;
use Doctrine\Tests\Mocks\DriverMock;
use Doctrine\ORM\Mapping\ClassMetadata;
use Doctrine\Common\EventManager;
use Doctrine\ORM\EntityManagerInterface;
use Doctrine\ORM\Id\AbstractIdGenerator;
use Doctrine\ORM\Mapping\ClassMetadataFactory;
class ClassMetadataFactoryTest extends \Doctrine\Tests\OrmTestCase
@ -410,9 +412,9 @@ class TestEntity1
private $association;
}
class CustomIdGenerator extends \Doctrine\ORM\Id\AbstractIdGenerator
class CustomIdGenerator extends AbstractIdGenerator
{
public function generate(\Doctrine\ORM\EntityManager $em, $entity)
public function generate(EntityManagerInterface $em, $entity)
{
}
}