-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
Symfony\Bundle\FrameworkBundle\Test\WebTestCase class not found #29215
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weβll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Either composer doesn't find the class or phpunit doesn't use phpunit.xml.dist. |
Status: Reviewed |
I have no idea yet what is causing this issue, but I can confirm it. |
seems to be caused by symfony/recipes#481 |
Does symfony/recipes#491 fix it? |
@nicolas-grekas I'm not sure how to test the recipe, but changing the code of
So, I think it does fix the issue. |
Thanks for the feedback. |
Even after removing the 3 lines, it still doesn't solve the issue for me =( |
I don't have the issue when starting a new project from scratch. |
I had the same issue with a new project from scratch. However, I could get through it thanks to the answer below.
|
In your class under tests folder, just replace this line |
I created fresh Symfony 4.1.x project, but when I'm trying to create and execute functional test I am getting error:
Steps to reproduce:
Create project
composer create-project symfony/skeleton my_project
Install phpunit, functional tests components and maker for generating skeleton of functional test
composer req --dev symfony/phpunit-bridge symfony/css-selector symfony/browser-kit symfony/maker-bundle
Create example functional test
bin/console make:functional-test ExampleControllerTest
Content of created file:
Run tests
bin/phpunit
Output (after installing phpunit dependencies):
I checked and class
Symfony\Bundle\FrameworkBundle\Test\WebTestCase
does exist invendor/
. Any clues?phpunit.xml.dist: https://pastebin.com/MYjgpFbA
composer.json: https://pastebin.com/WQaYFBq1
composer.lock: https://pastebin.com/pwRsmnY8
PHP Version: 7.2.12
The text was updated successfully, but these errors were encountered: