From 769b435cf3612f263883d4f0669b1c5654ab058f Mon Sep 17 00:00:00 2001 From: Jordi Boggiano Date: Tue, 29 Oct 2013 14:41:13 +0100 Subject: [PATCH] Test suite cleanups --- Tests/Fixtures/app/AppKernel.php | 3 --- Tests/WebTestCase.php | 6 ++++++ Tests/bootstrap.php | 3 +++ 3 files changed, 9 insertions(+), 3 deletions(-) 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');