diff --git a/Tests/Functional/AppKernel.php b/Tests/Functional/AppKernel.php index e11c06c..acc58b6 100644 --- a/Tests/Functional/AppKernel.php +++ b/Tests/Functional/AppKernel.php @@ -11,6 +11,10 @@ declare(strict_types=1); +namespace Qandidate\Bundle\ToggleBundle\Tests\Functional; + +use Qandidate\Bundle\ToggleBundle\QandidateToggleBundle; +use Symfony\Bundle\FrameworkBundle\FrameworkBundle; use Symfony\Component\Config\Loader\LoaderInterface; use Symfony\Component\HttpKernel\Kernel; @@ -19,8 +23,8 @@ class AppKernel extends Kernel public function registerBundles() { return [ - new Symfony\Bundle\FrameworkBundle\FrameworkBundle(), - new Qandidate\Bundle\ToggleBundle\QandidateToggleBundle(), + new FrameworkBundle(), + new QandidateToggleBundle(), ]; } diff --git a/Tests/Functional/WebTestCase.php b/Tests/Functional/WebTestCase.php index ec0806f..606da62 100644 --- a/Tests/Functional/WebTestCase.php +++ b/Tests/Functional/WebTestCase.php @@ -19,8 +19,6 @@ class WebTestCase extends BaseWebTestCase { protected static function getKernelClass() { - require __DIR__.'/AppKernel.php'; - - return 'AppKernel'; + return AppKernel::class; } } diff --git a/Tests/bootstrap.php b/Tests/bootstrap.php deleted file mode 100644 index e0e4467..0000000 --- a/Tests/bootstrap.php +++ /dev/null @@ -1,18 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -declare(strict_types=1); - -use Doctrine\Common\Annotations\AnnotationRegistry; - -$loader = require __DIR__.'/../vendor/autoload.php'; - -AnnotationRegistry::registerLoader([$loader, 'loadClass']); diff --git a/composer.json b/composer.json index 3c3bea6..b6d8689 100644 --- a/composer.json +++ b/composer.json @@ -28,7 +28,8 @@ "symfony/http-foundation": "^4.4.7||^5.0.7", "symfony/http-kernel": "^4.4.13||^5.1.5", "symfony/security-bundle": "^4.4||^5.0", - "doctrine/common": "^2.13||^3.0" + "doctrine/common":"^2.13||^3.0", + "doctrine/annotations": "^1.13" }, "require-dev": { "symfony/browser-kit": "^4.4||^5.0", diff --git a/phpunit.xml.dist b/phpunit.xml.dist index 2fab4f4..e6a885e 100644 --- a/phpunit.xml.dist +++ b/phpunit.xml.dist @@ -8,7 +8,7 @@ convertWarningsToExceptions="true" processIsolation="false" stopOnFailure="false" - bootstrap="Tests/bootstrap.php" + bootstrap="vendor/autoload.php" >