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

package info (click to toggle)
php-directory-scanner 1.3.3-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 256 kB
  • sloc: php: 364; xml: 209; sh: 11; makefile: 4
file content (51 lines) | stat: -rw-r--r-- 2,059 bytes parent folder | download | duplicates (3)
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: =?utf-8?q?David_Pr=C3=A9vot?= <taffit@debian.org>
Date: Sat, 12 Dec 2020 08:58:46 -0400
Subject: Adapt to recent version of PHPUnit (9)

---
 tests/directoryscanner.test.php | 15 +++++----------
 1 file changed, 5 insertions(+), 10 deletions(-)

diff --git a/tests/directoryscanner.test.php b/tests/directoryscanner.test.php
index 520b347..73f9497 100644
--- a/tests/directoryscanner.test.php
+++ b/tests/directoryscanner.test.php
@@ -60,21 +60,17 @@ namespace TheSeer\DirectoryScanner\Tests {
             $this->assertFalse($tmp->isFollowSymlinks());
         }
 
-        /**
-         * @expectedException \TheSeer\DirectoryScanner\Exception
-         * @expectedException \TheSeer\DirectoryScanner\Exception::InvalidFlag
-         */
         public function testSettingInvalidFlagThrowsException() {
             $tmp = new DirectoryScanner();
+            $this->expectException('\TheSeer\DirectoryScanner\Exception');
+            $this->expectExceptionCode(\TheSeer\DirectoryScanner\Exception::InvalidFlag);
             $tmp->setFlag(-1);
         }
 
-        /**
-         * @expectedException \TheSeer\DirectoryScanner\Exception
-         * @expectedException \TheSeer\DirectoryScanner\Exception::InvalidFlag
-         */
         public function testUnSettingInvalidFlagThrowsException() {
             $tmp = new DirectoryScanner();
+            $this->expectException('\TheSeer\DirectoryScanner\Exception');
+            $this->expectExceptionCode(\TheSeer\DirectoryScanner\Exception::InvalidFlag);
             $tmp->unsetFlag(-1);
         }
 
@@ -127,11 +123,10 @@ namespace TheSeer\DirectoryScanner\Tests {
 
         /**
          * Trying to scan a non existend directory should throw an exception
-         *
-         * @expectedException \TheSeer\DirectoryScanner\Exception
          */
         public function testScanOfNonExistendPath() {
             $tmp = new DirectoryScanner();
+            $this->expectException('\TheSeer\DirectoryScanner\Exception');
             $tmp(__DIR__ . '/_data//not/existing');
         }