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 : 18.118.140.120
Domains :
Cant Read [ /etc/named.conf ]
User : web
Terminal
Auto Root
Create File
Create Folder
Localroot Suggester
Backdoor Destroyer
Readme
/
home /
www /
1 /
vendor /
phpunit /
phpunit /
src /
Framework /
Delete
Unzip
Name
Size
Permission
Date
Action
Assert
[ DIR ]
drwxr-xr-x
2020-11-17 16:24
Constraint
[ DIR ]
drwxr-xr-x
2020-11-17 16:24
Error
[ DIR ]
drwxr-xr-x
2020-11-17 16:24
Exception
[ DIR ]
drwxr-xr-x
2020-11-17 16:24
MockObject
[ DIR ]
drwxr-xr-x
2020-11-17 16:24
Assert.php
113.19
KB
-rw-r--r--
2020-11-17 16:24
DataProviderTestSuite.php
1.42
KB
-rw-r--r--
2020-11-17 16:24
ExceptionWrapper.php
3.06
KB
-rw-r--r--
2020-11-17 16:24
IncompleteTest.php
409
B
-rw-r--r--
2020-11-17 16:24
IncompleteTestCase.php
1.37
KB
-rw-r--r--
2020-11-17 16:24
InvalidParameterGroupException.php
445
B
-rw-r--r--
2020-11-17 16:24
SelfDescribing.php
519
B
-rw-r--r--
2020-11-17 16:24
SkippedTest.php
406
B
-rw-r--r--
2020-11-17 16:24
SkippedTestCase.php
1.36
KB
-rw-r--r--
2020-11-17 16:24
Test.php
539
B
-rw-r--r--
2020-11-17 16:24
TestBuilder.php
6.83
KB
-rw-r--r--
2020-11-17 16:24
TestCase.php
75.72
KB
-rw-r--r--
2020-11-17 16:24
TestFailure.php
3.49
KB
-rw-r--r--
2020-11-17 16:24
TestListener.php
2.11
KB
-rw-r--r--
2020-11-17 16:24
TestListenerDefaultImplementation.php
1.2
KB
-rw-r--r--
2020-11-17 16:24
TestResult.php
31.28
KB
-rw-r--r--
2020-11-17 16:24
TestSuite.php
21.53
KB
-rw-r--r--
2020-11-17 16:24
TestSuiteIterator.php
1.63
KB
-rw-r--r--
2020-11-17 16:24
WarningTestCase.php
1.25
KB
-rw-r--r--
2020-11-17 16:24
Save
Rename
<?php declare(strict_types=1); /* * 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\Framework; use PHPUnit\Util\Filter; use PHPUnit\Util\InvalidDataSetException; use PHPUnit\Util\Test as TestUtil; /** * @internal This class is not covered by the backward compatibility promise for PHPUnit */ final class TestBuilder { public function build(\ReflectionClass $theClass, string $methodName): Test { $className = $theClass->getName(); if (!$theClass->isInstantiable()) { return new WarningTestCase( \sprintf('Cannot instantiate class "%s".', $className) ); } $backupSettings = TestUtil::getBackupSettings( $className, $methodName ); $preserveGlobalState = TestUtil::getPreserveGlobalStateSettings( $className, $methodName ); $runTestInSeparateProcess = TestUtil::getProcessIsolationSettings( $className, $methodName ); $runClassInSeparateProcess = TestUtil::getClassProcessIsolationSettings( $className, $methodName ); $constructor = $theClass->getConstructor(); if ($constructor === null) { throw new Exception('No valid test provided.'); } $parameters = $constructor->getParameters(); // TestCase() or TestCase($name) if (\count($parameters) < 2) { $test = $this->buildTestWithoutData($className); } // TestCase($name, $data) else { try { $data = TestUtil::getProvidedData( $className, $methodName ); } catch (IncompleteTestError $e) { $message = \sprintf( "Test for %s::%s marked incomplete by data provider\n%s", $className, $methodName, $this->throwableToString($e) ); $data = new IncompleteTestCase($className, $methodName, $message); } catch (SkippedTestError $e) { $message = \sprintf( "Test for %s::%s skipped by data provider\n%s", $className, $methodName, $this->throwableToString($e) ); $data = new SkippedTestCase($className, $methodName, $message); } catch (\Throwable $t) { $message = \sprintf( "The data provider specified for %s::%s is invalid.\n%s", $className, $methodName, $this->throwableToString($t) ); $data = new WarningTestCase($message); } // Test method with @dataProvider. if (isset($data)) { $test = $this->buildDataProviderTestSuite( $methodName, $className, $data, $runTestInSeparateProcess, $preserveGlobalState, $runClassInSeparateProcess, $backupSettings ); } else { $test = $this->buildTestWithoutData($className); } } if ($test instanceof TestCase) { $test->setName($methodName); $this->configureTestCase( $test, $runTestInSeparateProcess, $preserveGlobalState, $runClassInSeparateProcess, $backupSettings ); } return $test; } /** @psalm-param class-string $className */ private function buildTestWithoutData(string $className) { return new $className; } /** @psalm-param class-string $className */ private function buildDataProviderTestSuite( string $methodName, string $className, $data, bool $runTestInSeparateProcess, ?bool $preserveGlobalState, bool $runClassInSeparateProcess, array $backupSettings ): DataProviderTestSuite { $dataProviderTestSuite = new DataProviderTestSuite( $className . '::' . $methodName ); $groups = TestUtil::getGroups($className, $methodName); if ($data instanceof WarningTestCase || $data instanceof SkippedTestCase || $data instanceof IncompleteTestCase) { $dataProviderTestSuite->addTest($data, $groups); } else { foreach ($data as $_dataName => $_data) { $_test = new $className($methodName, $_data, $_dataName); \assert($_test instanceof TestCase); $this->configureTestCase( $_test, $runTestInSeparateProcess, $preserveGlobalState, $runClassInSeparateProcess, $backupSettings ); $dataProviderTestSuite->addTest($_test, $groups); } } return $dataProviderTestSuite; } private function configureTestCase( TestCase $test, bool $runTestInSeparateProcess, ?bool $preserveGlobalState, bool $runClassInSeparateProcess, array $backupSettings ): void { if ($runTestInSeparateProcess) { $test->setRunTestInSeparateProcess(true); if ($preserveGlobalState !== null) { $test->setPreserveGlobalState($preserveGlobalState); } } if ($runClassInSeparateProcess) { $test->setRunClassInSeparateProcess(true); if ($preserveGlobalState !== null) { $test->setPreserveGlobalState($preserveGlobalState); } } if ($backupSettings['backupGlobals'] !== null) { $test->setBackupGlobals($backupSettings['backupGlobals']); } if ($backupSettings['backupStaticAttributes'] !== null) { $test->setBackupStaticAttributes( $backupSettings['backupStaticAttributes'] ); } } private function throwableToString(\Throwable $t): string { $message = $t->getMessage(); if (empty(\trim($message))) { $message = '<no message>'; } if ($t instanceof InvalidDataSetException) { return \sprintf( "%s\n%s", $message, Filter::getFilteredStacktrace($t) ); } return \sprintf( "%s: %s\n%s", \get_class($t), $message, Filter::getFilteredStacktrace($t) ); } }