From: =?utf-8?q?David_Pr=C3=A9vot?= <david@tilapin.org>
Date: Sat, 3 May 2025 11:13:46 +0200
Subject: Group Composer for test relying on it

These tests fail outside of a Composer installed environment.
---
 tests/IntegrationTest.php | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/tests/IntegrationTest.php b/tests/IntegrationTest.php
index c293c40..c17de82 100644
--- a/tests/IntegrationTest.php
+++ b/tests/IntegrationTest.php
@@ -11,6 +11,7 @@
 
 namespace Symfony\WebpackEncoreBundle\Tests;
 
+use PHPUnit\Framework\Attributes\Group;
 use PHPUnit\Framework\TestCase;
 use Psr\Log\LogLevel;
 use Symfony\Bundle\FrameworkBundle\FrameworkBundle;
@@ -37,6 +38,7 @@ use Twig\Environment;
 
 class IntegrationTest extends TestCase
 {
+    #[Group('Composer')]
     public function testTwigIntegration()
     {
         $kernel = new WebpackEncoreIntegrationTestKernel(true);
@@ -95,6 +97,7 @@ class IntegrationTest extends TestCase
         );
     }
 
+    #[Group('Composer')]
     public function testEntriesAreNotRepeatedWhenAlreadyOutputIntegration()
     {
         $kernel = new WebpackEncoreIntegrationTestKernel(true);
@@ -124,6 +127,7 @@ class IntegrationTest extends TestCase
         );
     }
 
+    #[Group('Composer')]
     public function testEntriesExistsWhenDoingSubRequestIntegration()
     {
         $kernel = new WebpackEncoreIntegrationTestKernel(true);
@@ -145,6 +149,7 @@ class IntegrationTest extends TestCase
         $this->assertSame(1, $containsCount2);
     }
 
+    #[Group('Composer')]
     public function testCacheWarmer()
     {
         $kernel = new WebpackEncoreIntegrationTestKernel(true);
@@ -162,6 +167,7 @@ class IntegrationTest extends TestCase
         $this->assertSame(['_default', 'different_build', 'remote_build'], array_keys($data[0] ?? $data));
     }
 
+    #[Group('Composer')]
     public function testEnabledStrictModeThrowsExceptionIfBuildMissing()
     {
         $this->expectException(\Twig\Error\RuntimeError::class);
@@ -175,6 +181,7 @@ class IntegrationTest extends TestCase
         $twig->render('@integration_test/template.twig');
     }
 
+    #[Group('Composer')]
     public function testDisabledStrictModeIgnoresMissingBuild()
     {
         $kernel = new WebpackEncoreIntegrationTestKernel(true);
@@ -187,6 +194,7 @@ class IntegrationTest extends TestCase
         self::assertSame('', trim($html));
     }
 
+    #[Group('Composer')]
     public function testEnabledStrictModeThrowsExceptionIfRemoteBuildMissing()
     {
         $this->expectException(\Twig\Error\RuntimeError::class);
@@ -200,6 +208,7 @@ class IntegrationTest extends TestCase
         $twig->render('@integration_test/template_remote.twig');
     }
 
+    #[Group('Composer')]
     public function testDisabledStrictModeIgnoresMissingRemoteBuild()
     {
         $kernel = new WebpackEncoreIntegrationTestKernel(true);
@@ -212,6 +221,7 @@ class IntegrationTest extends TestCase
         self::assertSame('', trim($html));
     }
 
+    #[Group('Composer')]
     public function testAutowireableInterfaces()
     {
         $kernel = new WebpackEncoreIntegrationTestKernel(true);
@@ -220,6 +230,7 @@ class IntegrationTest extends TestCase
         $this->assertInstanceOf(WebpackEncoreAutowireTestService::class, $container->get(WebpackEncoreAutowireTestService::class));
     }
 
+    #[Group('Composer')]
     public function testPreload()
     {
         $kernel = new WebpackEncoreIntegrationTestKernel(true);
@@ -236,6 +247,7 @@ class IntegrationTest extends TestCase
         $this->assertStringContainsString('</build/file1.js>; rel="preload"; as="script"', $response->headers->get('Link'));
     }
 
+    #[Group('Composer')]
     public function testAutowireDefaultBuildArgument()
     {
         $kernel = new WebpackEncoreIntegrationTestKernel(true);
