[ Index ]

PHP Cross Reference of phpBB-3.2.11-deutsch

title

Body

[close]

/vendor/symfony/polyfill-util/ -> TestListenerForV5.php (source)

   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\Polyfill\Util;
  13  
  14  /**
  15   * @author Nicolas Grekas <p@tchwork.com>
  16   */
  17  class TestListenerForV5 extends \PHPUnit_Framework_TestSuite implements \PHPUnit_Framework_TestListener
  18  {
  19      private $suite;
  20      private $trait;
  21  
  22      public function __construct(\PHPUnit_Framework_TestSuite $suite = null)
  23      {
  24          if ($suite) {
  25              $this->suite = $suite;
  26              $this->setName($suite->getName().' with polyfills enabled');
  27              $this->addTest($suite);
  28          }
  29          $this->trait = new TestListenerTrait();
  30      }
  31  
  32      public function startTestSuite(\PHPUnit_Framework_TestSuite $suite)
  33      {
  34          $this->trait->startTestSuite($suite);
  35      }
  36  
  37      public function addError(\PHPUnit_Framework_Test $test, \Exception $e, $time)
  38      {
  39          $this->trait->addError($test, $e, $time);
  40      }
  41  
  42      public function addWarning(\PHPUnit_Framework_Test $test, \PHPUnit_Framework_Warning $e, $time)
  43      {
  44      }
  45  
  46      public function addFailure(\PHPUnit_Framework_Test $test, \PHPUnit_Framework_AssertionFailedError $e, $time)
  47      {
  48          $this->trait->addError($test, $e, $time);
  49      }
  50  
  51      public function addIncompleteTest(\PHPUnit_Framework_Test $test, \Exception $e, $time)
  52      {
  53      }
  54  
  55      public function addRiskyTest(\PHPUnit_Framework_Test $test, \Exception $e, $time)
  56      {
  57      }
  58  
  59      public function addSkippedTest(\PHPUnit_Framework_Test $test, \Exception $e, $time)
  60      {
  61      }
  62  
  63      public function endTestSuite(\PHPUnit_Framework_TestSuite $suite)
  64      {
  65      }
  66  
  67      public function startTest(\PHPUnit_Framework_Test $test)
  68      {
  69      }
  70  
  71      public function endTest(\PHPUnit_Framework_Test $test, $time)
  72      {
  73      }
  74  
  75      public static function warning($message)
  76      {
  77          return parent::warning($message);
  78      }
  79  
  80      protected function setUp()
  81      {
  82          TestListenerTrait::$enabledPolyfills = $this->suite->getName();
  83      }
  84  
  85      protected function tearDown()
  86      {
  87          TestListenerTrait::$enabledPolyfills = false;
  88      }
  89  }


Generated: Wed Nov 11 20:33:01 2020 Cross-referenced by PHPXref 0.7.1