[ Index ] |
PHP Cross Reference of phpBB-3.2.11-deutsch |
[Summary view] [Print] [Text view]
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 use PHPUnit\Framework\AssertionFailedError; 15 use PHPUnit\Framework\Test; 16 use PHPUnit\Framework\TestListener as TestListenerInterface; 17 use PHPUnit\Framework\TestSuite; 18 use PHPUnit\Framework\Warning; 19 use PHPUnit\Framework\WarningTestCase; 20 21 /** 22 * @author Ion Bazan <ion.bazan@gmail.com> 23 */ 24 class TestListenerForV7 extends TestSuite implements TestListenerInterface 25 { 26 private $suite; 27 private $trait; 28 29 public function __construct(TestSuite $suite = null) 30 { 31 if ($suite) { 32 $this->suite = $suite; 33 $this->setName($suite->getName().' with polyfills enabled'); 34 $this->addTest($suite); 35 } 36 $this->trait = new TestListenerTrait(); 37 } 38 39 public function startTestSuite(TestSuite $suite): void 40 { 41 $this->trait->startTestSuite($suite); 42 } 43 44 public function addError(Test $test, \Throwable $t, float $time): void 45 { 46 $this->trait->addError($test, $t, $time); 47 } 48 49 public function addWarning(Test $test, Warning $e, float $time): void 50 { 51 } 52 53 public function addFailure(Test $test, AssertionFailedError $e, float $time): void 54 { 55 $this->trait->addError($test, $e, $time); 56 } 57 58 public function addIncompleteTest(Test $test, \Throwable $t, float $time): void 59 { 60 } 61 62 public function addRiskyTest(Test $test, \Throwable $t, float $time): void 63 { 64 } 65 66 public function addSkippedTest(Test $test, \Throwable $t, float $time): void 67 { 68 } 69 70 public function endTestSuite(TestSuite $suite): void 71 { 72 } 73 74 public function startTest(Test $test): void 75 { 76 } 77 78 public function endTest(Test $test, float $time): void 79 { 80 } 81 82 public static function warning($message): WarningTestCase 83 { 84 return new WarningTestCase($message); 85 } 86 87 protected function setUp(): void 88 { 89 TestListenerTrait::$enabledPolyfills = $this->suite->getName(); 90 } 91 92 protected function tearDown(): void 93 { 94 TestListenerTrait::$enabledPolyfills = false; 95 } 96 }
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
Generated: Wed Nov 11 20:33:01 2020 | Cross-referenced by PHPXref 0.7.1 |