maker-bundle icon indicating copy to clipboard operation
maker-bundle copied to clipboard

Making an ApiTestCase breaks after installing API core

Open iisisrael opened this issue 3 years ago • 13 comments

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?                 

iisisrael avatar Mar 10 '21 20:03 iisisrael

This was cherry picked and merged in master already as part of https://github.com/apache/superset/pull/28057/commits

Antonio-RiveroMartnez avatar Aug 21 '24 16:08 Antonio-RiveroMartnez