Skip Doctrine tests if libraries are not available
This commit is contained in:
parent
ebeff1aae4
commit
3eb923cc84
|
@ -11,6 +11,13 @@ class Document{}
|
|||
*/
|
||||
class ListenerTest extends \PHPUnit_Framework_TestCase
|
||||
{
|
||||
public function setUp()
|
||||
{
|
||||
if (!class_exists('Doctrine\ODM\MongoDB\DocumentManager')) {
|
||||
$this->markTestSkipped('Doctrine MongoDB ODM is not available.');
|
||||
}
|
||||
}
|
||||
|
||||
public function testObjectInsertedOnPersist()
|
||||
{
|
||||
$persisterMock = $this->getMockBuilder('FOQ\ElasticaBundle\Persister\ObjectPersisterInterface')
|
||||
|
|
|
@ -11,6 +11,13 @@ class Entity{}
|
|||
*/
|
||||
class ListenerTest extends \PHPUnit_Framework_TestCase
|
||||
{
|
||||
public function setUp()
|
||||
{
|
||||
if (!class_exists('Doctrine\ORM\EntityManager')) {
|
||||
$this->markTestSkipped('Doctrine ORM is not available.');
|
||||
}
|
||||
}
|
||||
|
||||
public function testObjectInsertedOnPersist()
|
||||
{
|
||||
$persisterMock = $this->getMockBuilder('FOQ\ElasticaBundle\Persister\ObjectPersisterInterface')
|
||||
|
|
|
@ -13,6 +13,12 @@ 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()
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue