Updated Drupal to 8.6. This goes with the following updates because it's possible...
[yaffs-website] / vendor / psy / psysh / test / ConfigurationTest.php
index a250d834bc9ca7d434e85210d972884944c21795..b7b6c0c0133e9c3029e5af77fdeb9a8a7d4e3a63 100644 (file)
@@ -30,10 +30,10 @@ class ConfigurationTest extends \PHPUnit\Framework\TestCase
     {
         $config = $this->getConfig();
 
-        $this->assertSame(function_exists('readline'), $config->hasReadline());
-        $this->assertSame(function_exists('readline'), $config->useReadline());
-        $this->assertSame(function_exists('pcntl_signal'), $config->hasPcntl());
-        $this->assertSame(function_exists('pcntl_signal'), $config->usePcntl());
+        $this->assertSame(\function_exists('readline'), $config->hasReadline());
+        $this->assertSame(\function_exists('readline'), $config->useReadline());
+        $this->assertSame(\function_exists('pcntl_signal'), $config->hasPcntl());
+        $this->assertSame(\function_exists('pcntl_signal'), $config->usePcntl());
         $this->assertFalse($config->requireSemicolons());
         $this->assertSame(Configuration::COLOR_MODE_AUTO, $config->colorMode());
         $this->assertNull($config->getStartupMessage());
@@ -57,20 +57,20 @@ class ConfigurationTest extends \PHPUnit\Framework\TestCase
      */
     public function testFilesAndDirectories($home, $configFile, $historyFile, $manualDbFile)
     {
-        $oldHome = getenv('HOME');
-        putenv("HOME=$home");
+        $oldHome = \getenv('HOME');
+        \putenv("HOME=$home");
 
         $config = new Configuration();
-        $this->assertSame(realpath($configFile),   realpath($config->getConfigFile()));
-        $this->assertSame(realpath($historyFile),  realpath($config->getHistoryFile()));
-        $this->assertSame(realpath($manualDbFile), realpath($config->getManualDbFile()));
+        $this->assertSame(\realpath($configFile),   \realpath($config->getConfigFile()));
+        $this->assertSame(\realpath($historyFile),  \realpath($config->getHistoryFile()));
+        $this->assertSame(\realpath($manualDbFile), \realpath($config->getManualDbFile()));
 
-        putenv("HOME=$oldHome");
+        \putenv("HOME=$oldHome");
     }
 
     public function directories()
     {
-        $base = realpath(__DIR__ . '/fixtures');
+        $base = \realpath(__DIR__ . '/fixtures');
 
         return [
             [
@@ -125,21 +125,21 @@ class ConfigurationTest extends \PHPUnit\Framework\TestCase
     {
         $config = $this->getConfig(__DIR__ . '/fixtures/config.php');
 
-        $runtimeDir = $this->joinPath(realpath(sys_get_temp_dir()), 'psysh_test', 'withconfig', 'temp');
+        $runtimeDir = $this->joinPath(\realpath(\sys_get_temp_dir()), 'psysh_test', 'withconfig', 'temp');
 
-        $this->assertStringStartsWith($runtimeDir, realpath($config->getTempFile('foo', 123)));
-        $this->assertStringStartsWith($runtimeDir, realpath(dirname($config->getPipe('pipe', 123))));
-        $this->assertStringStartsWith($runtimeDir, realpath($config->getRuntimeDir()));
+        $this->assertStringStartsWith($runtimeDir, \realpath($config->getTempFile('foo', 123)));
+        $this->assertStringStartsWith($runtimeDir, \realpath(\dirname($config->getPipe('pipe', 123))));
+        $this->assertStringStartsWith($runtimeDir, \realpath($config->getRuntimeDir()));
 
-        $this->assertSame(function_exists('readline'), $config->useReadline());
+        $this->assertSame(\function_exists('readline'), $config->useReadline());
         $this->assertFalse($config->usePcntl());
         $this->assertSame(E_ALL & ~E_NOTICE, $config->errorLoggingLevel());
     }
 
     public function testLoadLocalConfigFile()
     {
-        $oldPwd = getcwd();
-        chdir(realpath(__DIR__ . '/fixtures/project/'));
+        $oldPwd = \getcwd();
+        \chdir(\realpath(__DIR__ . '/fixtures/project/'));
 
         $config = new Configuration();
 
@@ -153,7 +153,7 @@ class ConfigurationTest extends \PHPUnit\Framework\TestCase
         $this->assertFalse($config->requireSemicolons());
         $this->assertTrue($config->useUnicode());
 
-        chdir($oldPwd);
+        \chdir($oldPwd);
     }
 
     /**
@@ -166,7 +166,7 @@ class ConfigurationTest extends \PHPUnit\Framework\TestCase
 
     private function joinPath()
     {
-        return implode(DIRECTORY_SEPARATOR, func_get_args());
+        return \implode(DIRECTORY_SEPARATOR, \func_get_args());
     }
 
     public function testConfigIncludes()