I’m discovering API Platform and i’m now at the "Testing the API" step. I get two different errors I can’t resolve, event avec a composer install / update : 1) AppTestsBooksTest::testGetCollection Error: Call to undefined method ApiPlatformCoreBridgeSymfonyBundleTestConstraintArraySubsetLegacy::exporter() /srv/api/vendor/api-platform/core/src/Bridge/Symfony/Bundle/Test/Constraint/ArraySubsetTrait.php:76 /srv/api/vendor/api-platform/core/src/Bridge/Symfony/Bundle/Test/Constraint/ArraySubsetTrait.php:84 /srv/api/vendor/api-platform/core/src/Bridge/Symfony/Bundle/Test/Constraint/ArraySubsetTrait.php:68 /srv/api/vendor/api-platform/core/src/Bridge/Symfony/Bundle/Test/Constraint/ArraySubsetLegacy.php:32 /srv/api/vendor/api-platform/core/src/Bridge/Symfony/Bundle/Test/ApiTestAssertionsTrait.php:100 /srv/api/vendor/api-platform/core/src/Bridge/Symfony/Bundle/Test/ApiTestAssertionsTrait.php:57 /srv/api/tests/BooksTest.php:26 and 4) AppTestsBooksTest::testUpdateBook TypeError: Argument 2 passed to ApiPlatformCoreBridgeSymfonyBundleTestClient::request() must be ..
I created 2 projects, one is a bundle that handles the requests and contains the code, the second is just a project that includes the bundle. Why did I created a bundle ? Because this way, I can decorate the services / views depending on the customer I work with. I already have functional tests, ..
I’m currently introducing tests in my Symfony app. Some of them are failing and it takes ages to run them all. Is it possible to run a single test with the simpl-phpunit command ? I already tested : with the namespace of my test but ended up with ./vendor/bin/simple-phpunit ApptestsControllerDefaultControllerTest Cannot open file “ApptestsControllerDefaultControllerTest.php”. and ..
In my Symfony App, I’m currently writting the test of my forms following the documentation. In a contact form, when the data are validated I empty the form for further usage. I want to check this behaviour in my tests. I have 4 fields that contains several constrains that I didn’t represent here : public ..