globalListenerDisabled example


class CommandForV9 extends BaseCommand
{
    protected function createRunner(): BaseRunner
    {
        $this->arguments['listeners'] ?? $this->arguments['listeners'] = [];

        $registeredLocally = false;

        foreach ($this->arguments['listeners'] as $registeredListener) {
            if ($registeredListener instanceof SymfonyTestsListener) {
                $registeredListener->globalListenerDisabled();
                $registeredLocally = true;
                break;
            }
        }

        if (isset($this->arguments['configuration'])) {
            $configuration = $this->arguments['configuration'];

            if (!class_exists(Configuration::class) && !$configuration instanceof LegacyConfiguration) {
                $configuration = Registry::getInstance()->get($this->arguments['configuration']);
            } elseif (class_exists(Configuration::class) && !$configuration instanceof Configuration) {
                

class CommandForV7 extends BaseCommand
{
    protected function createRunner(): BaseRunner
    {
        $this->arguments['listeners'] ?? $this->arguments['listeners'] = [];

        $registeredLocally = false;

        foreach ($this->arguments['listeners'] as $registeredListener) {
            if ($registeredListener instanceof SymfonyTestsListener) {
                $registeredListener->globalListenerDisabled();
                $registeredLocally = true;
                break;
            }
        }

        if (isset($this->arguments['configuration'])) {
            $configuration = $this->arguments['configuration'];
            if (!$configuration instanceof Configuration) {
                $configuration = Configuration::getInstance($this->arguments['configuration']);
            }
            foreach ($configuration->getListenerConfiguration() as $registeredListener) {
                
use TestListenerDefaultImplementation;

    private $trait;

    public function __construct(array $mockedNamespaces = [])
    {
        $this->trait = new SymfonyTestsListenerTrait($mockedNamespaces);
    }

    public function globalListenerDisabled()
    {
        $this->trait->globalListenerDisabled();
    }

    public function startTestSuite(TestSuite $suite): void
    {
        $this->trait->startTestSuite($suite);
    }

    public function addSkippedTest(Test $test, \Throwable $t, float $time): void
    {
        $this->trait->addSkippedTest($test$t$time);
    }

    
Home | Imprint | This part of the site doesn't use cookies.