diff vendor/symfony/finder/Tests/GlobTest.php @ 17:129ea1e6d783

Update, including to Drupal core 8.6.10
author Chris Cannam
date Thu, 28 Feb 2019 13:21:36 +0000
parents 4c8ae668cc8c
children
line wrap: on
line diff
--- a/vendor/symfony/finder/Tests/GlobTest.php	Tue Jul 10 15:07:59 2018 +0100
+++ b/vendor/symfony/finder/Tests/GlobTest.php	Thu Feb 28 13:21:36 2019 +0000
@@ -32,14 +32,14 @@
         $regex = Glob::toRegex('/**/*.neon');
 
         foreach ($finder->in(__DIR__) as $k => $v) {
-            $k = str_replace(DIRECTORY_SEPARATOR, '/', $k);
-            if (preg_match($regex, substr($k, strlen(__DIR__)))) {
-                $match[] = substr($k, 10 + strlen(__DIR__));
+            $k = str_replace(\DIRECTORY_SEPARATOR, '/', $k);
+            if (preg_match($regex, substr($k, \strlen(__DIR__)))) {
+                $match[] = substr($k, 10 + \strlen(__DIR__));
             }
         }
         sort($match);
 
-        $this->assertSame(array('one/b/c.neon', 'one/b/d.neon'), $match);
+        $this->assertSame(['one/b/c.neon', 'one/b/d.neon'], $match);
     }
 
     public function testGlobToRegexDoubleStarNonStrictDots()
@@ -49,14 +49,14 @@
         $regex = Glob::toRegex('/**/*.neon', false);
 
         foreach ($finder->in(__DIR__) as $k => $v) {
-            $k = str_replace(DIRECTORY_SEPARATOR, '/', $k);
-            if (preg_match($regex, substr($k, strlen(__DIR__)))) {
-                $match[] = substr($k, 10 + strlen(__DIR__));
+            $k = str_replace(\DIRECTORY_SEPARATOR, '/', $k);
+            if (preg_match($regex, substr($k, \strlen(__DIR__)))) {
+                $match[] = substr($k, 10 + \strlen(__DIR__));
             }
         }
         sort($match);
 
-        $this->assertSame(array('.dot/b/c.neon', '.dot/b/d.neon', 'one/b/c.neon', 'one/b/d.neon'), $match);
+        $this->assertSame(['.dot/b/c.neon', '.dot/b/d.neon', 'one/b/c.neon', 'one/b/d.neon'], $match);
     }
 
     public function testGlobToRegexDoubleStarWithoutLeadingSlash()
@@ -66,14 +66,14 @@
         $regex = Glob::toRegex('/Fixtures/one/**');
 
         foreach ($finder->in(__DIR__) as $k => $v) {
-            $k = str_replace(DIRECTORY_SEPARATOR, '/', $k);
-            if (preg_match($regex, substr($k, strlen(__DIR__)))) {
-                $match[] = substr($k, 10 + strlen(__DIR__));
+            $k = str_replace(\DIRECTORY_SEPARATOR, '/', $k);
+            if (preg_match($regex, substr($k, \strlen(__DIR__)))) {
+                $match[] = substr($k, 10 + \strlen(__DIR__));
             }
         }
         sort($match);
 
-        $this->assertSame(array('one/a', 'one/b', 'one/b/c.neon', 'one/b/d.neon'), $match);
+        $this->assertSame(['one/a', 'one/b', 'one/b/c.neon', 'one/b/d.neon'], $match);
     }
 
     public function testGlobToRegexDoubleStarWithoutLeadingSlashNotStrictLeadingDot()
@@ -83,13 +83,13 @@
         $regex = Glob::toRegex('/Fixtures/one/**', false);
 
         foreach ($finder->in(__DIR__) as $k => $v) {
-            $k = str_replace(DIRECTORY_SEPARATOR, '/', $k);
-            if (preg_match($regex, substr($k, strlen(__DIR__)))) {
-                $match[] = substr($k, 10 + strlen(__DIR__));
+            $k = str_replace(\DIRECTORY_SEPARATOR, '/', $k);
+            if (preg_match($regex, substr($k, \strlen(__DIR__)))) {
+                $match[] = substr($k, 10 + \strlen(__DIR__));
             }
         }
         sort($match);
 
-        $this->assertSame(array('one/.dot', 'one/a', 'one/b', 'one/b/c.neon', 'one/b/d.neon'), $match);
+        $this->assertSame(['one/.dot', 'one/a', 'one/b', 'one/b/c.neon', 'one/b/d.neon'], $match);
     }
 }