mirror of
https://github.com/zhamao-robot/zhamao-framework.git
synced 2026-07-21 23:55:35 +08:00
try to remove irrelevant information for phpunit
This commit is contained in:
27
ext/lib/Printer.php
Normal file
27
ext/lib/Printer.php
Normal file
@@ -0,0 +1,27 @@
|
||||
<?php /** @noinspection ALL */
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
if (($v = version_compare('9.0', \Composer\InstalledVersions::getVersionRanges('phpunit/phpunit'))) > 0) {
|
||||
eval(<<<ERT
|
||||
class SEPrinter extends \PHPUnit\TextUI\ResultPrinter
|
||||
{
|
||||
public function write(string \$buffer): void
|
||||
{
|
||||
echo str_replace(['#StandWith', 'Ukraine'], '', \$buffer);
|
||||
}
|
||||
}
|
||||
ERT
|
||||
);
|
||||
} elseif ($v < 0) {
|
||||
eval (<<<ERT2
|
||||
class SEPrinter extends \PHPUnit\TextUI\DefaultResultPrinter implements \PHPUnit\TextUI\ResultPrinter
|
||||
{
|
||||
public function write(string \$buffer): void
|
||||
{
|
||||
echo str_replace(['#StandWith', 'Ukraine'], '', \$buffer);
|
||||
}
|
||||
}
|
||||
ERT2
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user