Skip to content

Making an ApiTestCase breaks after installing API core #836

Open
@iisisrael

Description

@iisisrael

Initially, I can create an ApiTestCase, ignoring the message:

 [WARNING] API Platform is required for this test type. Install it with                                                 
                                                                                                                        
           composer require api                                                                                         

The test created, of course, does not run successfully:

PHP Fatal error:  Uncaught Error: Class 'ApiPlatform\Core\Bridge\Symfony\Bundle\Test\ApiTestCase' not found in /var/www/html/tests/TestTest.php:7

However, if I install the required API dependencies, attempting to create an ApiTestCase breaks with this message:

$ bin/console make:test ApiTestCase

In KernelTestCase.php line 24:
                                                                          
  Attempted to load class "TestCase" from namespace "PHPUnit\Framework".  
  Did you forget a "use" statement for another namespace?                 

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions