File: 0004-Adapt-to-recent-version-of-PHPUnit-9.patch

package info (click to toggle)
php-oscarotero-gettext 4.8.7-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 1,464 kB
  • sloc: php: 5,256; xml: 20; javascript: 18; makefile: 14
file content (43 lines) | stat: -rw-r--r-- 1,605 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
38
39
40
41
42
43
From: =?utf-8?q?David_Pr=C3=A9vot?= <taffit@debian.org>
Date: Mon, 14 Dec 2020 01:31:19 -0400
Subject: Adapt to recent version of PHPUnit (9)

---
 tests/LocalesTest.php    | 4 +---
 tests/TranslatorTest.php | 4 +---
 2 files changed, 2 insertions(+), 6 deletions(-)

diff --git a/tests/LocalesTest.php b/tests/LocalesTest.php
index 30fb869..1354537 100644
--- a/tests/LocalesTest.php
+++ b/tests/LocalesTest.php
@@ -20,11 +20,9 @@ class LocalesTest extends AbstractTest
         $this->assertEquals('nplurals=3; plural=(n % 10 == 1 && n % 100 != 11) ? 0 : ((n % 10 >= 2 && n % 10 <= 4 && (n % 100 < 12 || n % 100 > 14)) ? 1 : 2);', $translations->getHeader('Plural-Forms'));
     }
 
-    /**
-     * @expectedException InvalidArgumentException
-     */
     public function testInvalidLanguage()
     {
+        $this->expectException('InvalidArgumentException');
         $translations = new Translations();
         $translations->setLanguage('invalid');
     }
diff --git a/tests/TranslatorTest.php b/tests/TranslatorTest.php
index da6bfda..6867ec0 100755
--- a/tests/TranslatorTest.php
+++ b/tests/TranslatorTest.php
@@ -93,11 +93,9 @@ class TranslatorTest extends AbstractTest
         $this->assertEquals('beaucoup de commentaires', n__('One comment', '%s comments', 3, ['%s' => 'beaucoup de']));
     }
 
-    /**
-     * @expectedException \InvalidArgumentException
-     */
     public function testPluralInjection()
     {
+        $this->expectException('InvalidArgumentException');
         $translations = new Translations();
         $translations->setPluralForms(2, 'fuu_call()');
     }