className example

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) {
                $configuration = (new Loader())->load($this->arguments['configuration']);
            }

            foreach ($configuration->listeners() as $registeredListener) {
                if ('Symfony\Bridge\PhpUnit\SymfonyTestsListener' === ltrim($registeredListener->className(), '\\')) {
                    $registeredLocally = true;
                    break;
                }
            }
        }

        if (!$registeredLocally) {
            $this->arguments['listeners'][] = new SymfonyTestsListener();
        }

        return parent::createRunner();
    }
Home | Imprint | This part of the site doesn't use cookies.