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');
         }
 
