File: 0001-Group-Composer-for-test-relying-on-it.patch

package info (click to toggle)
php-symfony-webpack-encore-bundle 2.3.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 408 kB
  • sloc: php: 1,697; xml: 92; makefile: 22
file content (109 lines) | stat: -rw-r--r-- 3,822 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
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);