Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion src/Hal/Tests/Serializer/CollectionNormalizerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
use ApiPlatform\Metadata\ResourceClassResolverInterface;
use ApiPlatform\State\Pagination\PaginatorInterface;
use ApiPlatform\State\Pagination\PartialPaginatorInterface;
use PHPUnit\Framework\Attributes\Group;
use PHPUnit\Framework\TestCase;
use Symfony\Component\Serializer\Normalizer\NormalizerInterface;

Expand All @@ -30,7 +31,7 @@
*/
class CollectionNormalizerTest extends TestCase
{
#[\PHPUnit\Framework\Attributes\Group('legacy')]
#[Group('legacy')]
public function testSupportsNormalize(): void
{
$resourceClassResolverMock = $this->createMock(ResourceClassResolverInterface::class);
Expand Down
3 changes: 2 additions & 1 deletion src/Hal/Tests/Serializer/ItemNormalizerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
use ApiPlatform\Tests\Fixtures\TestBundle\Entity\MaxDepthDummy;
use ApiPlatform\Tests\Fixtures\TestBundle\Entity\RelatedDummy;
use PHPUnit\Framework\Attributes\DataProvider;
use PHPUnit\Framework\Attributes\Group;
use PHPUnit\Framework\TestCase;
use Prophecy\Argument;
use Prophecy\PhpUnit\ProphecyTrait;
Expand Down Expand Up @@ -73,7 +74,7 @@ public function testDoesNotSupportDenormalization(): void
$normalizer->denormalize(['foo'], 'Foo');
}

#[\PHPUnit\Framework\Attributes\Group('legacy')]
#[Group('legacy')]
public function testSupportsNormalization(): void
{
$std = new \stdClass();
Expand Down
3 changes: 2 additions & 1 deletion src/Hal/Tests/Serializer/ObjectNormalizerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
use ApiPlatform\Hal\Serializer\ObjectNormalizer;
use ApiPlatform\Hal\Tests\Fixtures\Dummy;
use ApiPlatform\Metadata\IriConverterInterface;
use PHPUnit\Framework\Attributes\Group;
use PHPUnit\Framework\TestCase;
use Symfony\Component\Serializer\Exception\LogicException;
use Symfony\Component\Serializer\Normalizer\NormalizerInterface;
Expand All @@ -42,7 +43,7 @@ public function testDoesNotSupportDenormalization(): void
$normalizer->denormalize(['foo'], 'Foo');
}

#[\PHPUnit\Framework\Attributes\Group('legacy')]
#[Group('legacy')]
public function testSupportsNormalization(): void
{
$std = new \stdClass();
Expand Down
3 changes: 2 additions & 1 deletion src/Serializer/Tests/AbstractItemNormalizerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@
use ApiPlatform\Serializer\Tests\Fixtures\ApiResource\RelatedDummy;
use ApiPlatform\Serializer\Tests\Fixtures\ApiResource\SecuredDummy;
use Doctrine\Common\Collections\ArrayCollection;
use PHPUnit\Framework\Attributes\Group;
use PHPUnit\Framework\TestCase;
use Prophecy\Argument;
use Prophecy\PhpUnit\ProphecyTrait;
Expand All @@ -65,7 +66,7 @@ class AbstractItemNormalizerTest extends TestCase
{
use ProphecyTrait;

#[\PHPUnit\Framework\Attributes\Group('legacy')]
#[Group('legacy')]
public function testSupportNormalizationAndSupportDenormalization(): void
{
$std = new \stdClass();
Expand Down
3 changes: 2 additions & 1 deletion tests/Functional/BackedEnumPropertyTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
use ApiPlatform\Tests\Fixtures\TestBundle\Enum\GenderTypeEnum;
use ApiPlatform\Tests\RecreateSchemaTrait;
use ApiPlatform\Tests\SetupClassResourcesTrait;
use PHPUnit\Framework\Attributes\Group;
use Symfony\Component\HttpClient\HttpOptions;

final class BackedEnumPropertyTest extends ApiTestCase
Expand Down Expand Up @@ -53,7 +54,7 @@ public function testJson(): void
]);
}

#[\PHPUnit\Framework\Attributes\Group('legacy')]
#[Group('legacy')]
public function testGraphQl(): void
{
$person = $this->createPerson();
Expand Down
7 changes: 4 additions & 3 deletions tests/Functional/BackedEnumResourceTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
use ApiPlatform\Tests\Fixtures\TestBundle\ApiResource\Issue6264\Availability;
use ApiPlatform\Tests\Fixtures\TestBundle\ApiResource\Issue6264\AvailabilityStatus;
use ApiPlatform\Tests\SetupClassResourcesTrait;
use PHPUnit\Framework\Attributes\Group;
use Symfony\Component\HttpClient\HttpOptions;

final class BackedEnumResourceTest extends ApiTestCase
Expand Down Expand Up @@ -512,7 +513,7 @@ public static function providerEnumItemsGraphQl(): iterable
}

#[\PHPUnit\Framework\Attributes\DataProvider('providerEnumItemsGraphQl')]
#[\PHPUnit\Framework\Attributes\Group('legacy')]
#[Group('legacy')]
public function testItemGraphql(string $query, array $variables, array $expected): void
{
$options = (new HttpOptions())
Expand All @@ -524,7 +525,7 @@ public function testItemGraphql(string $query, array $variables, array $expected
$this->assertJsonEquals($expected);
}

#[\PHPUnit\Framework\Attributes\Group('legacy')]
#[Group('legacy')]
public function testCollectionGraphQl(): void
{
$query = <<<'GRAPHQL'
Expand All @@ -551,7 +552,7 @@ public function testCollectionGraphQl(): void
]);
}

#[\PHPUnit\Framework\Attributes\Group('legacy')]
#[Group('legacy')]
public function testItemGraphQlInteger(): void
{
$query = <<<'GRAPHQL'
Expand Down
3 changes: 2 additions & 1 deletion tests/Functional/Parameters/ParameterTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
use ApiPlatform\Tests\Fixtures\TestBundle\ApiResource\WithParameter;
use ApiPlatform\Tests\SetupClassResourcesTrait;
use PHPUnit\Framework\Attributes\DataProvider;
use PHPUnit\Framework\Attributes\Group;

final class ParameterTest extends ApiTestCase
{
Expand Down Expand Up @@ -82,7 +83,7 @@ public function testDisabled(): void
* Because of the openapiContext deprecation.
* TODO: only select a few classes to generate the docs for a faster test.
*/
#[\PHPUnit\Framework\Attributes\Group('legacy')]
#[Group('legacy')]
public function testDisableOpenApi(): void
{
$response = self::createClient()->request('GET', 'docs', ['headers' => ['accept' => 'application/vnd.openapi+json']]);
Expand Down
3 changes: 2 additions & 1 deletion tests/OpenApi/Command/OpenApiCommandTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
use ApiPlatform\Tests\Fixtures\TestBundle\ApiResource\Issue6317\Issue6317;
use ApiPlatform\Tests\Fixtures\TestBundle\Entity\Issue5625\Currency;
use ApiPlatform\Tests\SetupClassResourcesTrait;
use PHPUnit\Framework\Attributes\Group;
use Symfony\Bundle\FrameworkBundle\Console\Application;
use Symfony\Bundle\FrameworkBundle\Test\KernelTestCase;
use Symfony\Component\Console\Tester\ApplicationTester;
Expand Down Expand Up @@ -64,7 +65,7 @@ public function testExecute(): void
$this->assertJson($this->tester->getDisplay());
}

#[\PHPUnit\Framework\Attributes\Group('orm')]
#[Group('orm')]
public function testExecuteWithYaml(): void
{
$this->tester->run(['command' => 'api:openapi:export', '--yaml' => true]);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
namespace ApiPlatform\Tests\Problem\Serializer;

use ApiPlatform\Problem\Serializer\ConstraintViolationListNormalizer;
use PHPUnit\Framework\Attributes\Group;
use PHPUnit\Framework\TestCase;
use Prophecy\Argument;
use Prophecy\PhpUnit\ProphecyTrait;
Expand All @@ -30,7 +31,7 @@ class ConstraintViolationNormalizerTest extends TestCase
{
use ProphecyTrait;

#[\PHPUnit\Framework\Attributes\Group('legacy')]
#[Group('legacy')]
public function testSupportNormalization(): void
{
$nameConverterProphecy = $this->prophesize(NameConverterInterface::class);
Expand Down
15 changes: 8 additions & 7 deletions tests/Symfony/Bundle/Test/ApiTestCaseTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
use ApiPlatform\Tests\RecreateSchemaTrait;
use ApiPlatform\Tests\SetupClassResourcesTrait;
use Doctrine\ORM\EntityManagerInterface;
use PHPUnit\Framework\Attributes\Group;
use PHPUnit\Framework\ExpectationFailedException;
use Symfony\Component\HttpKernel\KernelInterface;

Expand Down Expand Up @@ -161,7 +162,7 @@ public function testAssertMatchesResourceCollectionJsonSchema(string $format, st
}

#[\PHPUnit\Framework\Attributes\DataProvider('providerFormats')]
#[\PHPUnit\Framework\Attributes\Group('orm')]
#[Group('orm')]
public function testAssertMatchesResourceCollectionJsonSchemaKeepSerializationContext(string $format, string $mimeType): void
{
$this->recreateSchema([Issue6146Parent::class, Issue6146Child::class]);
Expand Down Expand Up @@ -202,7 +203,7 @@ public function testAssertMatchesResourceItemJsonSchemaWithCustomOutput(string $
}

#[\PHPUnit\Framework\Attributes\DataProvider('providerFormats')]
#[\PHPUnit\Framework\Attributes\Group('orm')]
#[Group('orm')]
public function testAssertMatchesResourceItemJsonSchemaWithCustomJson(string $format, string $mimeType): void
{
$this->recreateSchema([JsonSchemaContextDummy::class]);
Expand All @@ -218,7 +219,7 @@ public function testAssertMatchesResourceItemJsonSchemaWithCustomJson(string $fo
}

#[\PHPUnit\Framework\Attributes\DataProvider('providerFormats')]
#[\PHPUnit\Framework\Attributes\Group('orm')]
#[Group('orm')]
public function testAssertMatchesResourceItemJsonSchemaOutput(string $format, string $mimeType): void
{
$this->recreateSchema([DummyDtoInputOutput::class]);
Expand All @@ -235,7 +236,7 @@ public function testAssertMatchesResourceItemJsonSchemaOutput(string $format, st
}

#[\PHPUnit\Framework\Attributes\DataProvider('providerFormats')]
#[\PHPUnit\Framework\Attributes\Group('orm')]
#[Group('orm')]
public function testAssertMatchesResourceItemAndCollectionJsonSchemaOutputWithContext(string $format, string $mimeType): void
{
$this->recreateSchema([User::class]);
Expand All @@ -256,7 +257,7 @@ public function testAssertMatchesResourceItemAndCollectionJsonSchemaOutputWithCo
$this->assertMatchesResourceCollectionJsonSchema(User::class, null, $format, ['groups' => ['api-test-case-group']]);
}

#[\PHPUnit\Framework\Attributes\Group('orm')]
#[Group('orm')]
public function testAssertMatchesResourceItemAndCollectionJsonSchemaOutputWithRangeAssertions(): void
{
$this->recreateSchema([NumericValidated::class]);
Expand Down Expand Up @@ -297,7 +298,7 @@ public function testAssertArraySubsetDoesNothingForValidScenario(): void
$this->assertArraySubset([1, 2], [1, 2, 3]);
}

#[\PHPUnit\Framework\Attributes\Group('orm')]
#[Group('orm')]
public function testFindIriBy(): void
{
$this->recreateSchema([Dummy::class, RelatedOwnedDummy::class, RelatedDummy::class]);
Expand Down Expand Up @@ -325,7 +326,7 @@ public function testGetPrioritizedOperation(): void
$this->assertResponseIsSuccessful();
}

#[\PHPUnit\Framework\Attributes\Group('mercure')]
#[Group('mercure')]
public function testGetMercureMessages(): void
{
self::bootKernel(['environment' => 'mercure']);
Expand Down
3 changes: 2 additions & 1 deletion tests/Symfony/Bundle/Twig/ApiPlatformProfilerPanelTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
use ApiPlatform\Tests\Fixtures\TestBundle\Entity\RelatedOwnedDummy;
use ApiPlatform\Tests\RecreateSchemaTrait;
use ApiPlatform\Tests\SetupClassResourcesTrait;
use PHPUnit\Framework\Attributes\Group;
use Symfony\Bundle\FrameworkBundle\Test\WebTestCase;

/**
Expand Down Expand Up @@ -60,7 +61,7 @@ public function testDebugBarContentNotResourceClass(): void
$this->assertSame('Not an API Platform resource', $block->filterXPath('//div[@class="sf-toolbar-info-piece"][./b[contains(., "Resource Class")]]/span')->html());
}

#[\PHPUnit\Framework\Attributes\Group('legacy')]
#[Group('legacy')]
public function testDebugBarContent(): void
{
$client = static::createClient();
Expand Down
Loading