Skip Doctrine tests if libraries are not available

Conflicts:

	Tests/Doctrine/RepositoryManagerTest.php
This commit is contained in:
Jeremy Mikola 2012-03-01 23:30:07 -05:00
parent d6dbefe969
commit 7f05e8311a
2 changed files with 14 additions and 0 deletions

View file

@ -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')

View file

@ -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')