Mercurial > hg > isophonics-drupal-site
diff vendor/psy/psysh/test/ConfigurationTest.php @ 17:129ea1e6d783
Update, including to Drupal core 8.6.10
author | Chris Cannam |
---|---|
date | Thu, 28 Feb 2019 13:21:36 +0000 |
parents | 5fb285c0d0e3 |
children |
line wrap: on
line diff
--- a/vendor/psy/psysh/test/ConfigurationTest.php Tue Jul 10 15:07:59 2018 +0100 +++ b/vendor/psy/psysh/test/ConfigurationTest.php Thu Feb 28 13:21:36 2019 +0000 @@ -30,10 +30,10 @@ { $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 @@ */ 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 @@ { $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 @@ $this->assertFalse($config->requireSemicolons()); $this->assertTrue($config->useUnicode()); - chdir($oldPwd); + \chdir($oldPwd); } /** @@ -166,7 +166,7 @@ private function joinPath() { - return implode(DIRECTORY_SEPARATOR, func_get_args()); + return \implode(DIRECTORY_SEPARATOR, \func_get_args()); } public function testConfigIncludes()