瀏覽代碼

[DoctrineMongoDBBundle] fixed UniqueValidatorTest to mark skipped if Doctrine\ODM classes not found

Bulat Shakirzyanov 14 年之前
父節點
當前提交
734be8107c

+ 3 - 1
src/Symfony/Bundle/DoctrineMongoDBBundle/Tests/Validator/Constraints/UniqueValidatorTest.php

@@ -5,10 +5,11 @@ namespace Symfony\Bundle\DoctrineMongoDBBundle\Tests\Validator\Constraints;
 use Doctrine\ODM\MongoDB\Mapping\ClassMetadata;
 use Doctrine\ODM\MongoDB\DocumentRepository;
 use Symfony\Bundle\DoctrineMongoDBBundle\Tests\Fixtures\Validator\Document;
+use Symfony\Bundle\DoctrineMongoDBBundle\Tests\TestCase;
 use Symfony\Bundle\DoctrineMongoDBBundle\Validator\Constraints\Unique;
 use Symfony\Bundle\DoctrineMongoDBBundle\Validator\Constraints\UniqueValidator;
 
-class UniqueValidatorTest extends \PHPUnit_Framework_TestCase
+class UniqueValidatorTest extends TestCase
 {
     private $dm;
     private $repository;
@@ -18,6 +19,7 @@ class UniqueValidatorTest extends \PHPUnit_Framework_TestCase
 
     public function setUp()
     {
+        parent::setUp();
         $this->classMetadata = $this->getClassMetadata();
         $this->repository = $this->getDocumentRepository();
         $this->dm = $this->getDocumentManager($this->classMetadata, $this->repository);