Linux unitednationsplay.com 3.10.0-1160.45.1.el7.x86_64 #1 SMP Wed Oct 13 17:20:51 UTC 2021 x86_64
nginx/1.20.1
Server IP : 188.130.139.92 & Your IP : 3.148.167.99
Domains :
Cant Read [ /etc/named.conf ]
User : web
Terminal
Auto Root
Create File
Create Folder
Localroot Suggester
Backdoor Destroyer
Readme
/
home /
www /
3 /
phpunit /
phpunit /
tests /
unit /
Runner /
Delete
Unzip
Name
Size
Permission
Date
Action
Filter
[ DIR ]
drwxr-xr-x
2018-12-03 09:00
PhptTestCaseTest.php
7.92
KB
-rw-r--r--
2018-12-03 09:00
ResultCacheExtensionTest.php
4.05
KB
-rw-r--r--
2018-12-03 09:00
TestSuiteSorterTest.php
19.84
KB
-rw-r--r--
2018-12-03 09:00
Save
Rename
<?php /* * This file is part of PHPUnit. * * (c) Sebastian Bergmann <sebastian@phpunit.de> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace PHPUnit\Runner; use PHPUnit\Framework\TestCase; use PHPUnit\Framework\TestCaseTest; use PHPUnit\Framework\TestResult; use PHPUnit\Framework\TestSuite; /** * @group test-reorder */ class ResultCacheExtensionTest extends TestCase { /** * @var TestResultCache */ protected $cache; /** * @var ResultCacheExtension */ protected $extension; /** * @var TestResult */ protected $result; protected function setUp(): void { $this->cache = new TestResultCache; $this->extension = new ResultCacheExtension($this->cache); $listener = new TestListenerAdapter; $listener->add($this->extension); $this->result = new TestResult; $this->result->addListener($listener); } /** * @dataProvider longTestNamesDataprovider */ public function testStripsDataproviderParametersFromTestName(string $testName, string $expectedTestName): void { $test = new TestCaseTest($testName); $test->run($this->result); $this->assertSame(BaseTestRunner::STATUS_ERROR, $this->cache->getState($expectedTestName)); } public function longTestNamesDataprovider(): array { return [ 'ClassName::testMethod' => [ 'testSomething', TestCaseTest::class . '::testSomething', ], 'ClassName::testMethod and data set number and vardump' => [ 'testMethod with data set #123 (\'a\', "A", 0, false)', TestCaseTest::class . '::testMethod with data set #123', ], 'ClassName::testMethod and data set name and vardump' => [ 'testMethod with data set "data name" (\'a\', "A\", 0, false)', TestCaseTest::class . '::testMethod with data set "data name"', ], ]; } public function testError(): void { $test = new \TestError('test_name'); $test->run($this->result); $this->assertSame(BaseTestRunner::STATUS_ERROR, $this->cache->getState(\TestError::class . '::test_name')); } public function testFailure(): void { $test = new \Failure('test_name'); $test->run($this->result); $this->assertSame(BaseTestRunner::STATUS_FAILURE, $this->cache->getState(\Failure::class . '::test_name')); } public function testSkipped(): void { $test = new \TestSkipped('test_name'); $test->run($this->result); $this->assertSame(BaseTestRunner::STATUS_SKIPPED, $this->cache->getState(\TestSkipped::class . '::test_name')); } public function testIncomplete(): void { $test = new \TestIncomplete('test_name'); $test->run($this->result); $this->assertSame(BaseTestRunner::STATUS_INCOMPLETE, $this->cache->getState(\TestIncomplete::class . '::test_name')); } public function testPassedTestsOnlyCacheTime(): void { $test = new \Success('test_name'); $test->run($this->result); $this->assertSame(BaseTestRunner::STATUS_UNKNOWN, $this->cache->getState(\Success::class . '::test_name')); } public function testWarning(): void { $test = new \TestWarning('test_name'); $test->run($this->result); $this->assertSame(BaseTestRunner::STATUS_WARNING, $this->cache->getState(\TestWarning::class . '::test_name')); } public function testRisky(): void { $test = new \TestRisky('test_name'); $test->run($this->result); $this->assertSame(BaseTestRunner::STATUS_RISKY, $this->cache->getState(\TestRisky::class . '::test_name')); } public function testEmptySuite(): void { $suite = new TestSuite; $suite->addTestSuite(\EmptyTestCaseTest::class); $suite->run($this->result); $this->assertSame(BaseTestRunner::STATUS_WARNING, $this->cache->getState('Warning')); } }