diff --git a/Tests/Fixtures/app/AppKernel.php b/Tests/Fixtures/app/AppKernel.php index adc9506..28a4b16 100644 --- a/Tests/Fixtures/app/AppKernel.php +++ b/Tests/Fixtures/app/AppKernel.php @@ -11,9 +11,6 @@ namespace Nelmio\ApiDocBundle\Tests\Functional; -// get the autoload file -require_once __DIR__.'/../../../vendor/autoload.php'; - use Symfony\Component\Config\Loader\LoaderInterface; use Symfony\Component\HttpKernel\Kernel; diff --git a/Tests/WebTestCase.php b/Tests/WebTestCase.php index e0d58d6..1d8d161 100644 --- a/Tests/WebTestCase.php +++ b/Tests/WebTestCase.php @@ -66,7 +66,13 @@ abstract class WebTestCase extends BaseWebTestCase public function setUp() { + $this->deleteTmpDir(); parent::setUp(); + } + + public function tearDown() + { + parent::tearDown(); $this->deleteTmpDir(); } } diff --git a/Tests/bootstrap.php b/Tests/bootstrap.php index 13adf81..e80ba00 100644 --- a/Tests/bootstrap.php +++ b/Tests/bootstrap.php @@ -16,3 +16,6 @@ if ((!$loader = includeIfExists(__DIR__.'/../vendor/autoload.php')) && (!$loader if (class_exists('Doctrine\Common\Annotations\AnnotationRegistry')) { \Doctrine\Common\Annotations\AnnotationRegistry::registerLoader(array($loader, 'loadClass')); } + +// force loading the ApiDoc annotation since the composer target-dir autoloader does not run through $loader::loadClass +class_exists('Nelmio\ApiDocBundle\Annotation\ApiDoc');