File: Skip-tearDown-for-tests-that-require-apcu.patch

package info (click to toggle)
phpmyadmin-motranslator 5.4.0-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 1,928 kB
  • sloc: php: 1,760; makefile: 9
file content (51 lines) | stat: -rw-r--r-- 1,836 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
From: William Desportes <williamdes@wdes.fr>
Date: Mon, 1 Sep 2025 02:10:19 +0200
Subject: Skip tearDown for tests that require apcu

Origin: upstream
Forwarded: https://github.com/phpmyadmin/motranslator/commit/4ac3205cabaf1c4f0525c2a49cbd5fe585c87320
---
 tests/Cache/ApcuCacheFactoryTest.php | 2 ++
 tests/Cache/ApcuCacheTest.php        | 2 ++
 2 files changed, 4 insertions(+)

diff --git a/tests/Cache/ApcuCacheFactoryTest.php b/tests/Cache/ApcuCacheFactoryTest.php
index debfda0..d10b981 100644
--- a/tests/Cache/ApcuCacheFactoryTest.php
+++ b/tests/Cache/ApcuCacheFactoryTest.php
@@ -8,6 +8,7 @@ use PhpMyAdmin\MoTranslator\Cache\ApcuCache;
 use PhpMyAdmin\MoTranslator\Cache\ApcuCacheFactory;
 use PhpMyAdmin\MoTranslator\MoParser;
 use PHPUnit\Framework\Attributes\CoversClass;
+use PHPUnit\Framework\Attributes\RequiresPhpExtension;
 use PHPUnit\Framework\TestCase;
 
 use function apcu_clear_cache;
@@ -18,6 +19,7 @@ use function function_exists;
 use function sleep;
 
 #[CoversClass(ApcuCacheFactory::class)]
+#[RequiresPhpExtension('apcu')]
 class ApcuCacheFactoryTest extends TestCase
 {
     protected function setUp(): void
diff --git a/tests/Cache/ApcuCacheTest.php b/tests/Cache/ApcuCacheTest.php
index 5aeb0bd..7a9b0fd 100644
--- a/tests/Cache/ApcuCacheTest.php
+++ b/tests/Cache/ApcuCacheTest.php
@@ -7,6 +7,7 @@ namespace PhpMyAdmin\MoTranslator\Tests\Cache;
 use PhpMyAdmin\MoTranslator\Cache\ApcuCache;
 use PhpMyAdmin\MoTranslator\MoParser;
 use PHPUnit\Framework\Attributes\CoversClass;
+use PHPUnit\Framework\Attributes\RequiresPhpExtension;
 use PHPUnit\Framework\TestCase;
 use ReflectionMethod;
 
@@ -22,6 +23,7 @@ use function implode;
 use function sleep;
 
 #[CoversClass(ApcuCache::class)]
+#[RequiresPhpExtension('apcu')]
 class ApcuCacheTest extends TestCase
 {
     protected function setUp(): void