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