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()
|
||||
{
|
||||
if (!interface_exists('Doctrine\Common\Persistence\ManagerRegistry')) {
|
||||
$this->markTestSkipped('Doctrine Common is not present');
|
||||
}
|
||||
|
||||
$this->registry = $this->getMockBuilder('Doctrine\Common\Persistence\ManagerRegistry')
|
||||
->disableOriginalConstructor()
|
||||
->getMock();
|
||||
|
|
|
@ -16,10 +16,6 @@ class AbstractProviderTest extends \PHPUnit_Framework_TestCase
|
|||
|
||||
public function setUp()
|
||||
{
|
||||
if (!interface_exists('Doctrine\Common\Persistence\ManagerRegistry')) {
|
||||
$this->markTestSkipped('Doctrine Common is not available.');
|
||||
}
|
||||
|
||||
$this->objectClass = 'objectClass';
|
||||
$this->options = array('debug_logging' => true, 'indexName' => 'index', 'typeName' => 'type');
|
||||
|
||||
|
|
|
@ -82,13 +82,6 @@ class ElasticaToModelTransformerTest extends \PHPUnit_Framework_TestCase
|
|||
|
||||
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')
|
||||
->disableOriginalConstructor()
|
||||
->getMock();
|
||||
|
|
|
@ -6,13 +6,6 @@ use FOS\ElasticaBundle\Tests\Doctrine\ListenerTest as BaseListenerTest;
|
|||
|
||||
class ListenerTest extends BaseListenerTest
|
||||
{
|
||||
public function setUp()
|
||||
{
|
||||
if (!class_exists('Doctrine\ORM\EntityManager')) {
|
||||
$this->markTestSkipped('Doctrine ORM is not available.');
|
||||
}
|
||||
}
|
||||
|
||||
protected function getClassMetadataClass()
|
||||
{
|
||||
return 'Doctrine\ORM\Mapping\ClassMetadata';
|
||||
|
|
|
@ -17,13 +17,6 @@ class Entity
|
|||
*/
|
||||
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()
|
||||
{
|
||||
/** @var $finderMock \PHPUnit_Framework_MockObject_MockObject|\FOS\ElasticaBundle\Finder\TransformedFinder */
|
||||
|
|
|
@ -31,13 +31,6 @@ class InvalidObjectPersister extends ObjectPersister
|
|||
|
||||
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()
|
||||
{
|
||||
$transformer = $this->getTransformer();
|
||||
|
|
|
@ -24,13 +24,6 @@ class POPO
|
|||
|
||||
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()
|
||||
{
|
||||
$transformer = $this->getTransformer();
|
||||
|
|
|
@ -125,13 +125,6 @@ class POPO
|
|||
|
||||
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()
|
||||
{
|
||||
$transformer = $this->getTransformer();
|
||||
|
|
|
@ -23,13 +23,6 @@ class POPO
|
|||
|
||||
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()
|
||||
{
|
||||
$transformer = $this->getTransformer();
|
||||
|
|
Loading…
Reference in a new issue