comparison vendor/symfony/phpunit-bridge/Legacy/TestRunnerForV7.php @ 16:c2387f117808

Routine composer update
author Chris Cannam
date Tue, 10 Jul 2018 15:07:59 +0100
parents
children
comparison
equal deleted inserted replaced
15:e200cb7efeb3 16:c2387f117808
1 <?php
2
3 /*
4 * This file is part of the Symfony package.
5 *
6 * (c) Fabien Potencier <fabien@symfony.com>
7 *
8 * For the full copyright and license information, please view the LICENSE
9 * file that was distributed with this source code.
10 */
11
12 namespace Symfony\Bridge\PhpUnit\Legacy;
13
14 use PHPUnit\TextUI\TestRunner as BaseRunner;
15 use Symfony\Bridge\PhpUnit\SymfonyTestsListener;
16
17 /**
18 * {@inheritdoc}
19 *
20 * @internal
21 */
22 class TestRunnerForV7 extends BaseRunner
23 {
24 /**
25 * {@inheritdoc}
26 */
27 protected function handleConfiguration(array &$arguments): void
28 {
29 $listener = new SymfonyTestsListener();
30
31 parent::handleConfiguration($arguments);
32
33 $arguments['listeners'] = isset($arguments['listeners']) ? $arguments['listeners'] : array();
34
35 $registeredLocally = false;
36
37 foreach ($arguments['listeners'] as $registeredListener) {
38 if ($registeredListener instanceof SymfonyTestsListener) {
39 $registeredListener->globalListenerDisabled();
40 $registeredLocally = true;
41 break;
42 }
43 }
44
45 if (!$registeredLocally) {
46 $arguments['listeners'][] = $listener;
47 }
48 }
49 }