File: 0012-Group-nophpunit11-for-tests-failing-with-PHPUnit-11.patch

package info (click to toggle)
composer 2.8.12-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 10,768 kB
  • sloc: php: 77,502; makefile: 59; xml: 39
file content (37 lines) | stat: -rw-r--r-- 1,492 bytes parent folder | download | duplicates (2)
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
From: =?utf-8?q?David_Pr=C3=A9vot?= <taffit@debian.org>
Date: Mon, 20 May 2024 11:58:08 +0200
Subject: Group nophpunit11 for tests failing with PHPUnit 11

Bug-Debian: https://bugs.debian.org/1070504
---
 tests/Composer/Test/Command/SelfUpdateCommandTest.php | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/tests/Composer/Test/Command/SelfUpdateCommandTest.php b/tests/Composer/Test/Command/SelfUpdateCommandTest.php
index b0589b2..9a6dac8 100644
--- a/tests/Composer/Test/Command/SelfUpdateCommandTest.php
+++ b/tests/Composer/Test/Command/SelfUpdateCommandTest.php
@@ -14,6 +14,7 @@ namespace Composer\Test\Command;
 
 use Composer\Composer;
 use Composer\Test\TestCase;
+use PHPUnit\Framework\Attributes\RequiresPhpunit;
 use Symfony\Component\Process\Process;
 
 /**
@@ -49,6 +50,7 @@ class SelfUpdateCommandTest extends TestCase
         self::assertStringContainsString('Upgrading to version', $appTester->getOutput());
     }
 
+    #[RequiresPhpunit('< 11')]
     public function testUpdateToSpecificVersion(): void
     {
         $appTester = new Process([PHP_BINARY, $this->phar, 'self-update', '2.4.0']);
@@ -70,6 +72,7 @@ class SelfUpdateCommandTest extends TestCase
     /**
      * @dataProvider channelOptions
      */
+    #[RequiresPhpunit('< 11')]
     public function testUpdateToDifferentChannel(string $option, string $expectedOutput): void
     {
         if (Composer::VERSION !== '@package_version'.'@' && in_array($option, ['--stable', '--preview'], true)) {