Elastica, Doctrine\Common and Doctrine\ORM are required for tests
This commit is contained in:
parent
dd388e4b25
commit
e796d6179b
|
@ -55,10 +55,6 @@ class AbstractElasticaToModelTransformerTest extends \PHPUnit_Framework_TestCase
|
||||||
|
|
||||||
protected function setUp()
|
protected function setUp()
|
||||||
{
|
{
|
||||||
if (!interface_exists('Doctrine\Common\Persistence\ManagerRegistry')) {
|
|
||||||
$this->markTestSkipped('Doctrine Common is not present');
|
|
||||||
}
|
|
||||||
|
|
||||||
$this->registry = $this->getMockBuilder('Doctrine\Common\Persistence\ManagerRegistry')
|
$this->registry = $this->getMockBuilder('Doctrine\Common\Persistence\ManagerRegistry')
|
||||||
->disableOriginalConstructor()
|
->disableOriginalConstructor()
|
||||||
->getMock();
|
->getMock();
|
||||||
|
|
|
@ -16,10 +16,6 @@ class AbstractProviderTest extends \PHPUnit_Framework_TestCase
|
||||||
|
|
||||||
public function setUp()
|
public function setUp()
|
||||||
{
|
{
|
||||||
if (!interface_exists('Doctrine\Common\Persistence\ManagerRegistry')) {
|
|
||||||
$this->markTestSkipped('Doctrine Common is not available.');
|
|
||||||
}
|
|
||||||
|
|
||||||
$this->objectClass = 'objectClass';
|
$this->objectClass = 'objectClass';
|
||||||
$this->options = array('debug_logging' => true, 'indexName' => 'index', 'typeName' => 'type');
|
$this->options = array('debug_logging' => true, 'indexName' => 'index', 'typeName' => 'type');
|
||||||
|
|
||||||
|
|
|
@ -82,13 +82,6 @@ class ElasticaToModelTransformerTest extends \PHPUnit_Framework_TestCase
|
||||||
|
|
||||||
protected function setUp()
|
protected function setUp()
|
||||||
{
|
{
|
||||||
if (!interface_exists('Doctrine\Common\Persistence\ManagerRegistry')) {
|
|
||||||
$this->markTestSkipped('Doctrine Common is not present');
|
|
||||||
}
|
|
||||||
if (!class_exists('Doctrine\ORM\EntityManager')) {
|
|
||||||
$this->markTestSkipped('Doctrine Common is not present');
|
|
||||||
}
|
|
||||||
|
|
||||||
$this->registry = $this->getMockBuilder('Doctrine\Common\Persistence\ManagerRegistry')
|
$this->registry = $this->getMockBuilder('Doctrine\Common\Persistence\ManagerRegistry')
|
||||||
->disableOriginalConstructor()
|
->disableOriginalConstructor()
|
||||||
->getMock();
|
->getMock();
|
||||||
|
|
|
@ -6,13 +6,6 @@ use FOS\ElasticaBundle\Tests\Doctrine\ListenerTest as BaseListenerTest;
|
||||||
|
|
||||||
class ListenerTest extends BaseListenerTest
|
class ListenerTest extends BaseListenerTest
|
||||||
{
|
{
|
||||||
public function setUp()
|
|
||||||
{
|
|
||||||
if (!class_exists('Doctrine\ORM\EntityManager')) {
|
|
||||||
$this->markTestSkipped('Doctrine ORM is not available.');
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
protected function getClassMetadataClass()
|
protected function getClassMetadataClass()
|
||||||
{
|
{
|
||||||
return 'Doctrine\ORM\Mapping\ClassMetadata';
|
return 'Doctrine\ORM\Mapping\ClassMetadata';
|
||||||
|
|
|
@ -17,13 +17,6 @@ class Entity
|
||||||
*/
|
*/
|
||||||
class RepositoryManagerTest extends \PHPUnit_Framework_TestCase
|
class RepositoryManagerTest extends \PHPUnit_Framework_TestCase
|
||||||
{
|
{
|
||||||
public function setUp()
|
|
||||||
{
|
|
||||||
if (!interface_exists('Doctrine\Common\Persistence\ManagerRegistry')) {
|
|
||||||
$this->markTestSkipped('Doctrine Common is not available.');
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public function testThatGetRepositoryReturnsDefaultRepository()
|
public function testThatGetRepositoryReturnsDefaultRepository()
|
||||||
{
|
{
|
||||||
/** @var $finderMock \PHPUnit_Framework_MockObject_MockObject|\FOS\ElasticaBundle\Finder\TransformedFinder */
|
/** @var $finderMock \PHPUnit_Framework_MockObject_MockObject|\FOS\ElasticaBundle\Finder\TransformedFinder */
|
||||||
|
|
|
@ -31,13 +31,6 @@ class InvalidObjectPersister extends ObjectPersister
|
||||||
|
|
||||||
class ObjectPersisterTest extends \PHPUnit_Framework_TestCase
|
class ObjectPersisterTest extends \PHPUnit_Framework_TestCase
|
||||||
{
|
{
|
||||||
public function setUp()
|
|
||||||
{
|
|
||||||
if (!class_exists('Elastica\Type')) {
|
|
||||||
$this->markTestSkipped('The Elastica library classes are not available');
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public function testThatCanReplaceObject()
|
public function testThatCanReplaceObject()
|
||||||
{
|
{
|
||||||
$transformer = $this->getTransformer();
|
$transformer = $this->getTransformer();
|
||||||
|
|
|
@ -24,13 +24,6 @@ class POPO
|
||||||
|
|
||||||
class ObjectSerializerPersisterTest extends \PHPUnit_Framework_TestCase
|
class ObjectSerializerPersisterTest extends \PHPUnit_Framework_TestCase
|
||||||
{
|
{
|
||||||
public function setUp()
|
|
||||||
{
|
|
||||||
if (!class_exists('Elastica\Type')) {
|
|
||||||
$this->markTestSkipped('The Elastica library classes are not available');
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public function testThatCanReplaceObject()
|
public function testThatCanReplaceObject()
|
||||||
{
|
{
|
||||||
$transformer = $this->getTransformer();
|
$transformer = $this->getTransformer();
|
||||||
|
|
|
@ -125,13 +125,6 @@ class POPO
|
||||||
|
|
||||||
class ModelToElasticaAutoTransformerTest extends \PHPUnit_Framework_TestCase
|
class ModelToElasticaAutoTransformerTest extends \PHPUnit_Framework_TestCase
|
||||||
{
|
{
|
||||||
public function setUp()
|
|
||||||
{
|
|
||||||
if (!class_exists('Elastica\Document')) {
|
|
||||||
$this->markTestSkipped('The Elastica library classes are not available');
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public function testThatCanTransformObject()
|
public function testThatCanTransformObject()
|
||||||
{
|
{
|
||||||
$transformer = $this->getTransformer();
|
$transformer = $this->getTransformer();
|
||||||
|
|
|
@ -23,13 +23,6 @@ class POPO
|
||||||
|
|
||||||
class ModelToElasticaIdentifierTransformerTest extends \PHPUnit_Framework_TestCase
|
class ModelToElasticaIdentifierTransformerTest extends \PHPUnit_Framework_TestCase
|
||||||
{
|
{
|
||||||
public function setUp()
|
|
||||||
{
|
|
||||||
if (!class_exists('Elastica\Document')) {
|
|
||||||
$this->markTestSkipped('The Elastica library classes are not available');
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public function testGetDocumentWithIdentifierOnly()
|
public function testGetDocumentWithIdentifierOnly()
|
||||||
{
|
{
|
||||||
$transformer = $this->getTransformer();
|
$transformer = $this->getTransformer();
|
||||||
|
|
Loading…
Reference in a new issue