Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

35 lines (28 sloc) 0.531 kb
<?php
namespace Doctrine\Tests\Mocks;
use Doctrine\ORM\EntityManager;
/**
* Mock class for SequenceGenerator.
*/
class SequenceMock extends \Doctrine\ORM\Id\SequenceGenerator
{
/**
* @var int
*/
private $_sequenceNumber = 0;
/**
* {@inheritdoc}
*/
public function generate(EntityManager $em, $entity)
{
return $this->_sequenceNumber++;
}
/* Mock API */
/**
* @return void
*/
public function reset()
{
$this->_sequenceNumber = 0;
}
}
Jump to Line
Something went wrong with that request. Please try again.