From 9971f4ebbd35079e4598b711dc31e65b89137c3c Mon Sep 17 00:00:00 2001 From: Maxcastel Date: Mon, 30 Mar 2026 10:16:21 +0200 Subject: [PATCH] feat: extract ApiTestCase in its own api-platform/test package --- symfony/file-upload.md | 2 +- symfony/jwt.md | 2 +- symfony/testing.md | 14 +++++++------- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/symfony/file-upload.md b/symfony/file-upload.md index 58ac5d242cd..d79b388fe48 100644 --- a/symfony/file-upload.md +++ b/symfony/file-upload.md @@ -368,7 +368,7 @@ To test your upload with `ApiTestCase`, you can write a method as below: namespace App\Tests; -use ApiPlatform\Symfony\Bundle\Test\ApiTestCase; +use ApiPlatform\Test\ApiTestCase; use App\Entity\MediaObject; use Hautelook\AliceBundle\PhpUnit\RefreshDatabaseTrait; use Symfony\Component\HttpFoundation\File\UploadedFile; diff --git a/symfony/jwt.md b/symfony/jwt.md index fd1d3fda593..4770519472a 100644 --- a/symfony/jwt.md +++ b/symfony/jwt.md @@ -256,7 +256,7 @@ To test your authentication with `ApiTestCase`, you can write a method as below: namespace App\Tests; -use ApiPlatform\Symfony\Bundle\Test\ApiTestCase; +use ApiPlatform\Test\ApiTestCase; use App\Entity\User; use Hautelook\AliceBundle\PhpUnit\ReloadDatabaseTrait; diff --git a/symfony/testing.md b/symfony/testing.md index 222ca2fa0ff..9ec8bf9cfec 100644 --- a/symfony/testing.md +++ b/symfony/testing.md @@ -206,7 +206,7 @@ Here is an example of functional tests specifying the behavior of namespace App\Tests; -use ApiPlatform\Symfony\Bundle\Test\ApiTestCase; +use ApiPlatform\Test\ApiTestCase; use App\Entity\Book; use App\Factory\BookFactory; use Zenstruck\Foundry\Test\Factories; @@ -461,7 +461,7 @@ To use the testing client, your test class must extend the `ApiTestCase` class: namespace App\Tests; -use ApiPlatform\Symfony\Bundle\Test\ApiTestCase; +use ApiPlatform\Test\ApiTestCase; class BooksTest extends ApiTestCase { @@ -486,8 +486,8 @@ Json Web Token authentication: // api/tests/AbstractTest.php namespace App\Tests; -use ApiPlatform\Symfony\Bundle\Test\ApiTestCase; -use ApiPlatform\Symfony\Bundle\Test\Client; +use ApiPlatform\Test\ApiTestCase; +use ApiPlatform\Test\Client; use Hautelook\AliceBundle\PhpUnit\RefreshDatabaseTrait; abstract class AbstractTest extends ApiTestCase @@ -571,7 +571,7 @@ Platform provides convenient PHPUnit assertions dedicated to API testing: namespace App\Tests; -use ApiPlatform\Symfony\Bundle\Test\ApiTestCase; +use ApiPlatform\Test\ApiTestCase; class MyTest extends ApiTestCase { @@ -608,7 +608,7 @@ There is also a method to find the IRI matching a given resource and some criter namespace App\Tests; -use ApiPlatform\Symfony\Bundle\Test\ApiTestCase; +use ApiPlatform\Test\ApiTestCase; class BooksTest extends ApiTestCase { @@ -633,7 +633,7 @@ documents...) can be used out of the box with the API Platform test client: namespace App\Tests; -use ApiPlatform\Symfony\Bundle\Test\ApiTestCase; +use ApiPlatform\Test\ApiTestCase; class BooksTest extends ApiTestCase {