🆙 Add cms i using 🆙

This commit is contained in:
Remco
2025-11-25 22:42:56 +01:00
parent 94704e0925
commit d44196149e
35591 changed files with 3601123 additions and 0 deletions
@@ -0,0 +1,22 @@
<?php
declare(strict_types=1);
namespace Pest\Mutate\Subscribers;
use PHPUnit\Event\TestSuite\Loaded;
use PHPUnit\Event\TestSuite\LoadedSubscriber;
/**
* @internal
*/
final class DisplayInitialTestRunMessage implements LoadedSubscriber
{
/**
* Runs the subscriber.
*/
public function notify(Loaded $event): void
{
// ...
}
}
@@ -0,0 +1,16 @@
<?php
declare(strict_types=1);
namespace Pest\Mutate\Subscribers;
use PHPUnit\Event\Application\Finished;
use PHPUnit\Event\Application\FinishedSubscriber;
/**
* @internal
*/
final class EnsureInitialTestRunWasSuccessful implements FinishedSubscriber
{
public function notify(Finished $event): void {}
}
@@ -0,0 +1,30 @@
<?php
declare(strict_types=1);
namespace Pest\Mutate\Subscribers;
use NunoMaduro\Collision\Adapters\Phpunit\Printers\DefaultPrinter;
use Pest\Mutate\Contracts\MutationTestRunner;
use Pest\Support\Container;
use PHPUnit\Event\TestSuite\Loaded;
use PHPUnit\Event\TestSuite\LoadedSubscriber;
/**
* @internal
*/
final class PrepareForInitialTestRun implements LoadedSubscriber
{
/**
* Runs the subscriber.
*/
public function notify(Loaded $event): void
{
/** @var MutationTestRunner $mutationTestRunner */
$mutationTestRunner = Container::getInstance()->get(MutationTestRunner::class);
if ($mutationTestRunner->isEnabled()) {
DefaultPrinter::compact(true);
}
}
}
@@ -0,0 +1,20 @@
<?php
declare(strict_types=1);
namespace Pest\Mutate\Subscribers;
use Pest\Mutate\Contracts\Printer;
/**
* @internal
*/
abstract class PrinterSubscriber
{
public function __construct(private readonly Printer $printer) {}
protected function printer(): Printer
{
return $this->printer;
}
}
@@ -0,0 +1,29 @@
<?php
declare(strict_types=1);
namespace Pest\Mutate\Subscribers;
use Pest\Mutate\Contracts\MutationTestRunner;
use Pest\Mutate\Event\Events\Test\Outcome\Uncovered;
use Pest\Mutate\Event\Events\Test\Outcome\UncoveredSubscriber;
use Pest\Mutate\Repositories\ConfigurationRepository;
use Pest\Support\Container;
/**
* @internal
*/
final class StopOnUncoveredMutation implements UncoveredSubscriber
{
public function notify(Uncovered $event): void
{
if (! Container::getInstance()->get(ConfigurationRepository::class) // @phpstan-ignore-line
->mergedConfiguration()
->stopOnUncovered) {
return;
}
Container::getInstance()->get(MutationTestRunner::class) // @phpstan-ignore-line
->stopExecution();
}
}
@@ -0,0 +1,29 @@
<?php
declare(strict_types=1);
namespace Pest\Mutate\Subscribers;
use Pest\Mutate\Contracts\MutationTestRunner;
use Pest\Mutate\Event\Events\Test\Outcome\Untested;
use Pest\Mutate\Event\Events\Test\Outcome\UntestedSubscriber;
use Pest\Mutate\Repositories\ConfigurationRepository;
use Pest\Support\Container;
/**
* @internal
*/
final class StopOnUntestedMutation implements UntestedSubscriber
{
public function notify(Untested $event): void
{
if (! Container::getInstance()->get(ConfigurationRepository::class) // @phpstan-ignore-line
->mergedConfiguration()
->stopOnUntested) {
return;
}
Container::getInstance()->get(MutationTestRunner::class) // @phpstan-ignore-line
->stopExecution();
}
}
@@ -0,0 +1,19 @@
<?php
declare(strict_types=1);
namespace Pest\Mutate\Subscribers;
use Pest\Mutate\Event\Events\TestSuite\FinishMutationSuite;
use Pest\Mutate\Event\Events\TestSuite\FinishMutationSuiteSubscriber;
/**
* @internal
*/
final class TrackMutationSuiteFinish implements FinishMutationSuiteSubscriber
{
public function notify(FinishMutationSuite $event): void
{
$event->mutationSuite->trackFinish();
}
}
@@ -0,0 +1,19 @@
<?php
declare(strict_types=1);
namespace Pest\Mutate\Subscribers;
use Pest\Mutate\Event\Events\TestSuite\StartMutationSuite;
use Pest\Mutate\Event\Events\TestSuite\StartMutationSuiteSubscriber;
/**
* @internal
*/
final class TrackMutationSuiteStart implements StartMutationSuiteSubscriber
{
public function notify(StartMutationSuite $event): void
{
$event->mutationSuite->trackStart();
}
}