From 7856b7897db45403af96d13d342de7f75430ad89 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Thu, 18 Apr 2024 19:39:00 +0000 Subject: [PATCH] phan: Update custom stubs (#36978) * phan: Update custom stubs * ksort phpunit file list --------- Co-authored-by: matticbot Co-authored-by: Brad Jorsch --- .phan/stubs/phpunit-stubs.php | 13876 +++++++++---------- .phan/stubs/woocommerce-internal-stubs.php | 2 +- tools/stubs/phpunit-stub-defs.php | 1 + 3 files changed, 6940 insertions(+), 6939 deletions(-) diff --git a/.phan/stubs/phpunit-stubs.php b/.phan/stubs/phpunit-stubs.php index 0708b0301c7bb..01c004657092a 100644 --- a/.phan/stubs/phpunit-stubs.php +++ b/.phan/stubs/phpunit-stubs.php @@ -17,3356 +17,1655 @@ interface Exception extends \Throwable namespace PHPUnit\Framework; /** - * @internal This class is not covered by the backward compatibility promise for PHPUnit + * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit */ -final class ActualValueIsNotAnObjectException extends \PHPUnit\Framework\Exception +abstract class Assert { - public function __construct() + /** + * Asserts that an array has a specified key. + * + * @param int|string $key + * @param array|\ArrayAccess $array + * + * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * @throws Exception + * @throws ExpectationFailedException + */ + public static function assertArrayHasKey($key, $array, string $message = ''): void { } - public function __toString(): string + /** + * Asserts that an array does not have a specified key. + * + * @param int|string $key + * @param array|\ArrayAccess $array + * + * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * @throws Exception + * @throws ExpectationFailedException + */ + public static function assertArrayNotHasKey($key, $array, string $message = ''): void { } -} -/** - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final class ComparisonMethodDoesNotDeclareBoolReturnTypeException extends \PHPUnit\Framework\Exception -{ - public function __construct(string $className, string $methodName) + /** + * Asserts that a haystack contains a needle. + * + * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * @throws Exception + * @throws ExpectationFailedException + */ + public static function assertContains($needle, iterable $haystack, string $message = ''): void { } - public function __toString(): string + public static function assertContainsEquals($needle, iterable $haystack, string $message = ''): void { } -} -/** - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final class InvalidDataProviderException extends \PHPUnit\Framework\Exception -{ -} -/** - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final class ComparisonMethodDoesNotExistException extends \PHPUnit\Framework\Exception -{ - public function __construct(string $className, string $methodName) + /** + * Asserts that a haystack does not contain a needle. + * + * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * @throws Exception + * @throws ExpectationFailedException + */ + public static function assertNotContains($needle, iterable $haystack, string $message = ''): void { } - public function __toString(): string + public static function assertNotContainsEquals($needle, iterable $haystack, string $message = ''): void { } -} -/** - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final class ComparisonMethodDoesNotDeclareExactlyOneParameterException extends \PHPUnit\Framework\Exception -{ - public function __construct(string $className, string $methodName) + /** + * Asserts that a haystack contains only values of a given type. + * + * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * @throws ExpectationFailedException + */ + public static function assertContainsOnly(string $type, iterable $haystack, ?bool $isNativeType = null, string $message = ''): void { } - public function __toString(): string + /** + * Asserts that a haystack contains only instances of a given class name. + * + * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * @throws ExpectationFailedException + */ + public static function assertContainsOnlyInstancesOf(string $className, iterable $haystack, string $message = ''): void { } -} -/** - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final class CoveredCodeNotExecutedException extends \PHPUnit\Framework\RiskyTestError -{ -} -/** - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final class SyntheticSkippedError extends \PHPUnit\Framework\SyntheticError implements \PHPUnit\Framework\SkippedTest -{ -} -/** - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final class ComparisonMethodDoesNotAcceptParameterTypeException extends \PHPUnit\Framework\Exception -{ - public function __construct(string $className, string $methodName, string $type) + /** + * Asserts that a haystack does not contain only values of a given type. + * + * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * @throws ExpectationFailedException + */ + public static function assertNotContainsOnly(string $type, iterable $haystack, ?bool $isNativeType = null, string $message = ''): void { } - public function __toString(): string + /** + * Asserts the number of elements of an array, Countable or Traversable. + * + * @param \Countable|iterable $haystack + * + * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * @throws Exception + * @throws ExpectationFailedException + */ + public static function assertCount(int $expectedCount, $haystack, string $message = ''): void { } -} -/** - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final class ComparisonMethodDoesNotDeclareParameterTypeException extends \PHPUnit\Framework\Exception -{ - public function __construct(string $className, string $methodName) + /** + * Asserts the number of elements of an array, Countable or Traversable. + * + * @param \Countable|iterable $haystack + * + * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * @throws Exception + * @throws ExpectationFailedException + */ + public static function assertNotCount(int $expectedCount, $haystack, string $message = ''): void { } - public function __toString(): string + /** + * Asserts that two variables are equal. + * + * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * @throws ExpectationFailedException + */ + public static function assertEquals($expected, $actual, string $message = ''): void { } -} -/** - * Exception for expectations which failed their check. - * - * The exception contains the error message and optionally a - * SebastianBergmann\Comparator\ComparisonFailure which is used to - * generate diff output of the failed expectations. - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final class ExpectationFailedException extends \PHPUnit\Framework\AssertionFailedError -{ - public function __construct(string $message, ?\SebastianBergmann\Comparator\ComparisonFailure $comparisonFailure = null, ?\Exception $previous = null) + /** + * Asserts that two variables are equal (canonicalizing). + * + * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * @throws ExpectationFailedException + */ + public static function assertEqualsCanonicalizing($expected, $actual, string $message = ''): void { } - public function getComparisonFailure(): ?\SebastianBergmann\Comparator\ComparisonFailure + /** + * Asserts that two variables are equal (ignoring case). + * + * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * @throws ExpectationFailedException + */ + public static function assertEqualsIgnoringCase($expected, $actual, string $message = ''): void { } -} -/** - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -class AssertionFailedError extends \PHPUnit\Framework\Exception implements \PHPUnit\Framework\SelfDescribing -{ /** - * Wrapper for getMessage() which is declared as final. + * Asserts that two variables are equal (with delta). + * + * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * @throws ExpectationFailedException */ - public function toString(): string + public static function assertEqualsWithDelta($expected, $actual, float $delta, string $message = ''): void { } -} -/** - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final class SkippedTestSuiteError extends \PHPUnit\Framework\AssertionFailedError implements \PHPUnit\Framework\SkippedTest -{ -} -/** - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final class OutputError extends \PHPUnit\Framework\AssertionFailedError -{ -} -/** - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final class InvalidArgumentException extends \PHPUnit\Framework\Exception -{ - public static function create(int $argument, string $type): self + /** + * Asserts that two variables are not equal. + * + * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * @throws ExpectationFailedException + */ + public static function assertNotEquals($expected, $actual, string $message = ''): void { } -} -/** - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final class Warning extends \PHPUnit\Framework\Exception implements \PHPUnit\Framework\SelfDescribing -{ /** - * Wrapper for getMessage() which is declared as final. + * Asserts that two variables are not equal (canonicalizing). + * + * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * @throws ExpectationFailedException */ - public function toString(): string + public static function assertNotEqualsCanonicalizing($expected, $actual, string $message = ''): void { } -} -/** - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final class Error extends \PHPUnit\Framework\Exception implements \PHPUnit\Framework\SelfDescribing -{ /** - * Wrapper for getMessage() which is declared as final. + * Asserts that two variables are not equal (ignoring case). + * + * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * @throws ExpectationFailedException */ - public function toString(): string + public static function assertNotEqualsIgnoringCase($expected, $actual, string $message = ''): void { } -} -/** - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final class InvalidCoversTargetException extends \PHPUnit\Framework\CodeCoverageException -{ -} -/** - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final class IncompleteTestError extends \PHPUnit\Framework\AssertionFailedError implements \PHPUnit\Framework\IncompleteTest -{ -} -/** - * Base class for all PHPUnit Framework exceptions. - * - * Ensures that exceptions thrown during a test run do not leave stray - * references behind. - * - * Every Exception contains a stack trace. Each stack frame contains the 'args' - * of the called function. The function arguments can contain references to - * instantiated objects. The references prevent the objects from being - * destructed (until test results are eventually printed), so memory cannot be - * freed up. - * - * With enabled process isolation, test results are serialized in the child - * process and unserialized in the parent process. The stack trace of Exceptions - * may contain objects that cannot be serialized or unserialized (e.g., PDO - * connections). Unserializing user-space objects from the child process into - * the parent would break the intended encapsulation of process isolation. - * - * @see http://fabien.potencier.org/article/9/php-serialization-stack-traces-and-exceptions - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -class Exception extends \RuntimeException implements \PHPUnit\Exception -{ /** - * @var array + * Asserts that two variables are not equal (with delta). + * + * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * @throws ExpectationFailedException */ - protected $serializableTrace; - public function __construct($message = '', $code = 0, ?\Throwable $previous = null) - { - } - public function __toString(): string - { - } - public function __sleep(): array + public static function assertNotEqualsWithDelta($expected, $actual, float $delta, string $message = ''): void { } /** - * Returns the serializable trace (without 'args'). + * @throws ExpectationFailedException */ - public function getSerializableTrace(): array + public static function assertObjectEquals(object $expected, object $actual, string $method = 'equals', string $message = ''): void { } -} -/** - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -class CodeCoverageException extends \PHPUnit\Framework\Exception -{ -} -/** - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final class NoChildTestSuiteException extends \PHPUnit\Framework\Exception -{ -} -/** - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -class RiskyTestError extends \PHPUnit\Framework\AssertionFailedError -{ -} -/** - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final class UnintentionallyCoveredCodeError extends \PHPUnit\Framework\RiskyTestError -{ -} -/** - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -class SyntheticError extends \PHPUnit\Framework\AssertionFailedError -{ /** - * The synthetic file. + * Asserts that a variable is empty. * - * @var string - */ - protected $syntheticFile = ''; - /** - * The synthetic line number. + * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * @throws ExpectationFailedException * - * @var int + * @phan-assert empty $actual */ - protected $syntheticLine = 0; + public static function assertEmpty($actual, string $message = ''): void + { + } /** - * The synthetic trace. + * Asserts that a variable is not empty. * - * @var array + * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * @throws ExpectationFailedException + * + * @phan-assert !empty $actual */ - protected $syntheticTrace = []; - public function __construct(string $message, int $code, string $file, int $line, array $trace) - { - } - public function getSyntheticFile(): string - { - } - public function getSyntheticLine(): int - { - } - public function getSyntheticTrace(): array + public static function assertNotEmpty($actual, string $message = ''): void { } -} -/** - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final class SkippedTestError extends \PHPUnit\Framework\AssertionFailedError implements \PHPUnit\Framework\SkippedTest -{ -} -/** - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final class MissingCoversAnnotationException extends \PHPUnit\Framework\RiskyTestError -{ -} -/** - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final class PHPTAssertionFailedError extends \PHPUnit\Framework\SyntheticError -{ - public function __construct(string $message, int $code, string $file, int $line, array $trace, string $diff) + /** + * Asserts that a value is greater than another value. + * + * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * @throws ExpectationFailedException + */ + public static function assertGreaterThan($expected, $actual, string $message = ''): void { } - public function getDiff(): string + /** + * Asserts that a value is greater than or equal to another value. + * + * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * @throws ExpectationFailedException + */ + public static function assertGreaterThanOrEqual($expected, $actual, string $message = ''): void { } -} -/** - * @template-implements \RecursiveIterator - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final class TestSuiteIterator implements \RecursiveIterator -{ - public function __construct(\PHPUnit\Framework\TestSuite $testSuite) + /** + * Asserts that a value is smaller than another value. + * + * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * @throws ExpectationFailedException + */ + public static function assertLessThan($expected, $actual, string $message = ''): void { } - public function rewind(): void + /** + * Asserts that a value is smaller than or equal to another value. + * + * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * @throws ExpectationFailedException + */ + public static function assertLessThanOrEqual($expected, $actual, string $message = ''): void { } - public function valid(): bool + /** + * Asserts that the contents of one file is equal to the contents of another + * file. + * + * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * @throws ExpectationFailedException + */ + public static function assertFileEquals(string $expected, string $actual, string $message = ''): void { } - public function key(): int + /** + * Asserts that the contents of one file is equal to the contents of another + * file (canonicalizing). + * + * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * @throws ExpectationFailedException + */ + public static function assertFileEqualsCanonicalizing(string $expected, string $actual, string $message = ''): void { } - public function current(): \PHPUnit\Framework\Test + /** + * Asserts that the contents of one file is equal to the contents of another + * file (ignoring case). + * + * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * @throws ExpectationFailedException + */ + public static function assertFileEqualsIgnoringCase(string $expected, string $actual, string $message = ''): void { } - public function next(): void + /** + * Asserts that the contents of one file is not equal to the contents of + * another file. + * + * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * @throws ExpectationFailedException + */ + public static function assertFileNotEquals(string $expected, string $actual, string $message = ''): void { } /** - * @throws NoChildTestSuiteException + * Asserts that the contents of one file is not equal to the contents of another + * file (canonicalizing). + * + * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * @throws ExpectationFailedException */ - public function getChildren(): self + public static function assertFileNotEqualsCanonicalizing(string $expected, string $actual, string $message = ''): void { } - public function hasChildren(): bool + /** + * Asserts that the contents of one file is not equal to the contents of another + * file (ignoring case). + * + * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * @throws ExpectationFailedException + */ + public static function assertFileNotEqualsIgnoringCase(string $expected, string $actual, string $message = ''): void { } -} -/** - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final class DataProviderTestSuite extends \PHPUnit\Framework\TestSuite -{ /** - * @param list $dependencies + * Asserts that the contents of a string is equal + * to the contents of a file. + * + * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * @throws ExpectationFailedException */ - public function setDependencies(array $dependencies): void + public static function assertStringEqualsFile(string $expectedFile, string $actualString, string $message = ''): void { } /** - * @return list + * Asserts that the contents of a string is equal + * to the contents of a file (canonicalizing). + * + * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * @throws ExpectationFailedException */ - public function provides(): array + public static function assertStringEqualsFileCanonicalizing(string $expectedFile, string $actualString, string $message = ''): void { } /** - * @return list + * Asserts that the contents of a string is equal + * to the contents of a file (ignoring case). + * + * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * @throws ExpectationFailedException */ - public function requires(): array + public static function assertStringEqualsFileIgnoringCase(string $expectedFile, string $actualString, string $message = ''): void { } /** - * Returns the size of the each test created using the data provider(s). + * Asserts that the contents of a string is not equal + * to the contents of a file. * * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * @throws ExpectationFailedException */ - public function getSize(): int + public static function assertStringNotEqualsFile(string $expectedFile, string $actualString, string $message = ''): void { } -} -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - */ -abstract class TestCase extends \PHPUnit\Framework\Assert implements \PHPUnit\Framework\Reorderable, \PHPUnit\Framework\SelfDescribing, \PHPUnit\Framework\Test -{ - /** - * @var ?bool - */ - protected $backupGlobals; - /** - * @var string[] - */ - protected $backupGlobalsExcludeList = []; /** - * @var string[] + * Asserts that the contents of a string is not equal + * to the contents of a file (canonicalizing). * - * @deprecated Use $backupGlobalsExcludeList instead - */ - protected $backupGlobalsBlacklist = []; - /** - * @var ?bool - */ - protected $backupStaticAttributes; - /** - * @var array> + * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * @throws ExpectationFailedException */ - protected $backupStaticAttributesExcludeList = []; + public static function assertStringNotEqualsFileCanonicalizing(string $expectedFile, string $actualString, string $message = ''): void + { + } /** - * @var array> + * Asserts that the contents of a string is not equal + * to the contents of a file (ignoring case). * - * @deprecated Use $backupStaticAttributesExcludeList instead - */ - protected $backupStaticAttributesBlacklist = []; - /** - * @var ?bool - */ - protected $runTestInSeparateProcess; - /** - * @var bool + * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * @throws ExpectationFailedException */ - protected $preserveGlobalState = true; + public static function assertStringNotEqualsFileIgnoringCase(string $expectedFile, string $actualString, string $message = ''): void + { + } /** - * @var list + * Asserts that a file/dir is readable. + * + * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * @throws ExpectationFailedException */ - protected $providedTests = []; + public static function assertIsReadable(string $filename, string $message = ''): void + { + } /** - * Returns a matcher that matches when the method is executed - * zero or more times. + * Asserts that a file/dir exists and is not readable. + * + * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * @throws ExpectationFailedException */ - public static function any(): \PHPUnit\Framework\MockObject\Rule\AnyInvokedCount + public static function assertIsNotReadable(string $filename, string $message = ''): void { } /** - * Returns a matcher that matches when the method is never executed. + * Asserts that a file/dir exists and is not readable. + * + * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * @throws ExpectationFailedException + * + * @codeCoverageIgnore + * + * @deprecated https://github.com/sebastianbergmann/phpunit/issues/4062 */ - public static function never(): \PHPUnit\Framework\MockObject\Rule\InvokedCount + public static function assertNotIsReadable(string $filename, string $message = ''): void { } /** - * Returns a matcher that matches when the method is executed - * at least N times. + * Asserts that a file/dir exists and is writable. + * + * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * @throws ExpectationFailedException */ - public static function atLeast(int $requiredInvocations): \PHPUnit\Framework\MockObject\Rule\InvokedAtLeastCount + public static function assertIsWritable(string $filename, string $message = ''): void { } /** - * Returns a matcher that matches when the method is executed at least once. + * Asserts that a file/dir exists and is not writable. + * + * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * @throws ExpectationFailedException */ - public static function atLeastOnce(): \PHPUnit\Framework\MockObject\Rule\InvokedAtLeastOnce + public static function assertIsNotWritable(string $filename, string $message = ''): void { } /** - * Returns a matcher that matches when the method is executed exactly once. + * Asserts that a file/dir exists and is not writable. + * + * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * @throws ExpectationFailedException + * + * @codeCoverageIgnore + * + * @deprecated https://github.com/sebastianbergmann/phpunit/issues/4065 */ - public static function once(): \PHPUnit\Framework\MockObject\Rule\InvokedCount + public static function assertNotIsWritable(string $filename, string $message = ''): void { } /** - * Returns a matcher that matches when the method is executed - * exactly $count times. + * Asserts that a directory exists. + * + * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * @throws ExpectationFailedException */ - public static function exactly(int $count): \PHPUnit\Framework\MockObject\Rule\InvokedCount + public static function assertDirectoryExists(string $directory, string $message = ''): void { } /** - * Returns a matcher that matches when the method is executed - * at most N times. + * Asserts that a directory does not exist. + * + * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * @throws ExpectationFailedException */ - public static function atMost(int $allowedInvocations): \PHPUnit\Framework\MockObject\Rule\InvokedAtMostCount + public static function assertDirectoryDoesNotExist(string $directory, string $message = ''): void { } /** - * Returns a matcher that matches when the method is executed - * at the given index. + * Asserts that a directory does not exist. * - * @deprecated https://github.com/sebastianbergmann/phpunit/issues/4297 + * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * @throws ExpectationFailedException * * @codeCoverageIgnore + * + * @deprecated https://github.com/sebastianbergmann/phpunit/issues/4068 */ - public static function at(int $index): \PHPUnit\Framework\MockObject\Rule\InvokedAtIndex - { - } - public static function returnValue($value): \PHPUnit\Framework\MockObject\Stub\ReturnStub - { - } - public static function returnValueMap(array $valueMap): \PHPUnit\Framework\MockObject\Stub\ReturnValueMap - { - } - public static function returnArgument(int $argumentIndex): \PHPUnit\Framework\MockObject\Stub\ReturnArgument - { - } - public static function returnCallback($callback): \PHPUnit\Framework\MockObject\Stub\ReturnCallback + public static function assertDirectoryNotExists(string $directory, string $message = ''): void { } /** - * Returns the current object. + * Asserts that a directory exists and is readable. * - * This method is useful when mocking a fluent interface. + * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * @throws ExpectationFailedException */ - public static function returnSelf(): \PHPUnit\Framework\MockObject\Stub\ReturnSelf - { - } - public static function throwException(\Throwable $exception): \PHPUnit\Framework\MockObject\Stub\Exception - { - } - public static function onConsecutiveCalls(...$args): \PHPUnit\Framework\MockObject\Stub\ConsecutiveCalls + public static function assertDirectoryIsReadable(string $directory, string $message = ''): void { } /** - * @param int|string $dataName + * Asserts that a directory exists and is not readable. * - * @internal This method is not covered by the backward compatibility promise for PHPUnit + * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * @throws ExpectationFailedException */ - public function __construct(?string $name = null, array $data = [], $dataName = '') + public static function assertDirectoryIsNotReadable(string $directory, string $message = ''): void { } /** - * This method is called before the first test of this test class is run. + * Asserts that a directory exists and is not readable. + * + * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * @throws ExpectationFailedException + * + * @codeCoverageIgnore + * + * @deprecated https://github.com/sebastianbergmann/phpunit/issues/4071 */ - public static function setUpBeforeClass(): void + public static function assertDirectoryNotIsReadable(string $directory, string $message = ''): void { } /** - * This method is called after the last test of this test class is run. + * Asserts that a directory exists and is writable. + * + * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * @throws ExpectationFailedException */ - public static function tearDownAfterClass(): void + public static function assertDirectoryIsWritable(string $directory, string $message = ''): void { } /** - * This method is called before each test. + * Asserts that a directory exists and is not writable. + * + * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * @throws ExpectationFailedException */ - protected function setUp(): void + public static function assertDirectoryIsNotWritable(string $directory, string $message = ''): void { } /** - * Performs assertions shared by all tests of a test case. + * Asserts that a directory exists and is not writable. * - * This method is called between setUp() and test. + * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * @throws ExpectationFailedException + * + * @codeCoverageIgnore + * + * @deprecated https://github.com/sebastianbergmann/phpunit/issues/4074 */ - protected function assertPreConditions(): void + public static function assertDirectoryNotIsWritable(string $directory, string $message = ''): void { } /** - * Performs assertions shared by all tests of a test case. + * Asserts that a file exists. * - * This method is called between test and tearDown(). + * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * @throws ExpectationFailedException */ - protected function assertPostConditions(): void + public static function assertFileExists(string $filename, string $message = ''): void { } /** - * This method is called after each test. + * Asserts that a file does not exist. + * + * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * @throws ExpectationFailedException */ - protected function tearDown(): void + public static function assertFileDoesNotExist(string $filename, string $message = ''): void { } /** - * Returns a string representation of the test case. + * Asserts that a file does not exist. * - * @throws Exception * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * @throws ExpectationFailedException + * + * @codeCoverageIgnore + * + * @deprecated https://github.com/sebastianbergmann/phpunit/issues/4077 */ - public function toString(): string - { - } - public function count(): int - { - } - public function getActualOutputForAssertion(): string - { - } - public function expectOutputRegex(string $expectedRegex): void + public static function assertFileNotExists(string $filename, string $message = ''): void { } - public function expectOutputString(string $expectedString): void + /** + * Asserts that a file exists and is readable. + * + * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * @throws ExpectationFailedException + */ + public static function assertFileIsReadable(string $file, string $message = ''): void { } /** - * @phan-param class-string<\Throwable> $exception + * Asserts that a file exists and is not readable. + * + * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * @throws ExpectationFailedException */ - public function expectException(string $exception): void + public static function assertFileIsNotReadable(string $file, string $message = ''): void { } /** - * @param int|string $code + * Asserts that a file exists and is not readable. + * + * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * @throws ExpectationFailedException + * + * @codeCoverageIgnore + * + * @deprecated https://github.com/sebastianbergmann/phpunit/issues/4080 */ - public function expectExceptionCode($code): void - { - } - public function expectExceptionMessage(string $message): void - { - } - public function expectExceptionMessageMatches(string $regularExpression): void + public static function assertFileNotIsReadable(string $file, string $message = ''): void { } /** - * Sets up an expectation for an exception to be raised by the code under test. - * Information for expected exception class, expected exception message, and - * expected exception code are retrieved from a given Exception object. + * Asserts that a file exists and is writable. + * + * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * @throws ExpectationFailedException */ - public function expectExceptionObject(\Exception $exception): void - { - } - public function expectNotToPerformAssertions(): void + public static function assertFileIsWritable(string $file, string $message = ''): void { } /** - * @deprecated https://github.com/sebastianbergmann/phpunit/issues/5062 + * Asserts that a file exists and is not writable. + * + * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * @throws ExpectationFailedException */ - public function expectDeprecation(): void + public static function assertFileIsNotWritable(string $file, string $message = ''): void { } /** - * @deprecated https://github.com/sebastianbergmann/phpunit/issues/5062 + * Asserts that a file exists and is not writable. + * + * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * @throws ExpectationFailedException + * + * @codeCoverageIgnore + * + * @deprecated https://github.com/sebastianbergmann/phpunit/issues/4083 */ - public function expectDeprecationMessage(string $message): void + public static function assertFileNotIsWritable(string $file, string $message = ''): void { } /** - * @deprecated https://github.com/sebastianbergmann/phpunit/issues/5062 + * Asserts that a condition is true. + * + * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * @throws ExpectationFailedException + * + * @phan-assert true $condition */ - public function expectDeprecationMessageMatches(string $regularExpression): void + public static function assertTrue($condition, string $message = ''): void { } /** - * @deprecated https://github.com/sebastianbergmann/phpunit/issues/5062 + * Asserts that a condition is not true. + * + * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * @throws ExpectationFailedException + * + * @phan-assert !true $condition */ - public function expectNotice(): void + public static function assertNotTrue($condition, string $message = ''): void { } /** - * @deprecated https://github.com/sebastianbergmann/phpunit/issues/5062 + * Asserts that a condition is false. + * + * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * @throws ExpectationFailedException + * + * @phan-assert false $condition */ - public function expectNoticeMessage(string $message): void + public static function assertFalse($condition, string $message = ''): void { } /** - * @deprecated https://github.com/sebastianbergmann/phpunit/issues/5062 + * Asserts that a condition is not false. + * + * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * @throws ExpectationFailedException + * + * @phan-assert !false $condition */ - public function expectNoticeMessageMatches(string $regularExpression): void + public static function assertNotFalse($condition, string $message = ''): void { } /** - * @deprecated https://github.com/sebastianbergmann/phpunit/issues/5062 + * Asserts that a variable is null. + * + * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * @throws ExpectationFailedException + * + * @phan-assert null $actual */ - public function expectWarning(): void + public static function assertNull($actual, string $message = ''): void { } /** - * @deprecated https://github.com/sebastianbergmann/phpunit/issues/5062 + * Asserts that a variable is not null. + * + * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * @throws ExpectationFailedException + * + * @phan-assert !null $actual */ - public function expectWarningMessage(string $message): void + public static function assertNotNull($actual, string $message = ''): void { } /** - * @deprecated https://github.com/sebastianbergmann/phpunit/issues/5062 + * Asserts that a variable is finite. + * + * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * @throws ExpectationFailedException */ - public function expectWarningMessageMatches(string $regularExpression): void + public static function assertFinite($actual, string $message = ''): void { } /** - * @deprecated https://github.com/sebastianbergmann/phpunit/issues/5062 + * Asserts that a variable is infinite. + * + * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * @throws ExpectationFailedException */ - public function expectError(): void + public static function assertInfinite($actual, string $message = ''): void { } /** - * @deprecated https://github.com/sebastianbergmann/phpunit/issues/5062 + * Asserts that a variable is nan. + * + * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * @throws ExpectationFailedException */ - public function expectErrorMessage(string $message): void + public static function assertNan($actual, string $message = ''): void { } /** - * @deprecated https://github.com/sebastianbergmann/phpunit/issues/5062 + * Asserts that a class has a specified attribute. + * + * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * @throws Exception + * @throws ExpectationFailedException + * + * @deprecated https://github.com/sebastianbergmann/phpunit/issues/4601 */ - public function expectErrorMessageMatches(string $regularExpression): void - { - } - public function getStatus(): int - { - } - public function markAsRisky(): void + public static function assertClassHasAttribute(string $attributeName, string $className, string $message = ''): void { } - public function getStatusMessage(): string + /** + * Asserts that a class does not have a specified attribute. + * + * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * @throws Exception + * @throws ExpectationFailedException + * + * @deprecated https://github.com/sebastianbergmann/phpunit/issues/4601 + */ + public static function assertClassNotHasAttribute(string $attributeName, string $className, string $message = ''): void { } - public function hasFailed(): bool + /** + * Asserts that a class has a specified static attribute. + * + * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * @throws Exception + * @throws ExpectationFailedException + * + * @deprecated https://github.com/sebastianbergmann/phpunit/issues/4601 + */ + public static function assertClassHasStaticAttribute(string $attributeName, string $className, string $message = ''): void { } /** - * Runs the test case and collects the results in a TestResult object. - * If no TestResult object is passed a new one will be created. + * Asserts that a class does not have a specified static attribute. * - * @throws \SebastianBergmann\CodeCoverage\InvalidArgumentException - * @throws CodeCoverageException * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * @throws \SebastianBergmann\CodeCoverage\UnintentionallyCoveredCodeException - * @throws \PHPUnit\Util\Exception + * @throws Exception + * @throws ExpectationFailedException + * + * @deprecated https://github.com/sebastianbergmann/phpunit/issues/4601 */ - public function run(?\PHPUnit\Framework\TestResult $result = null): \PHPUnit\Framework\TestResult + public static function assertClassNotHasStaticAttribute(string $attributeName, string $className, string $message = ''): void { } /** - * Returns a builder object to create mock objects using a fluent interface. + * Asserts that an object has a specified attribute. * - * @phan-template RealInstanceType of object + * @param object $object * - * @phan-param class-string $className + * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * @throws Exception + * @throws ExpectationFailedException * - * @phan-return MockObject\MockBuilder + * @deprecated https://github.com/sebastianbergmann/phpunit/issues/4601 */ - public function getMockBuilder(string $className): \PHPUnit\Framework\MockObject\MockBuilder - { - } - public function registerComparator(\SebastianBergmann\Comparator\Comparator $comparator): void + public static function assertObjectHasAttribute(string $attributeName, $object, string $message = ''): void { } /** - * @return string[] + * Asserts that an object does not have a specified attribute. * - * @internal This method is not covered by the backward compatibility promise for PHPUnit + * @param object $object + * + * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * @throws Exception + * @throws ExpectationFailedException + * + * @deprecated https://github.com/sebastianbergmann/phpunit/issues/4601 */ - public function doubledTypes(): array + public static function assertObjectNotHasAttribute(string $attributeName, $object, string $message = ''): void { } /** - * @internal This method is not covered by the backward compatibility promise for PHPUnit + * Asserts that an object has a specified property. + * + * @throws ExpectationFailedException */ - public function getGroups(): array + final public static function assertObjectHasProperty(string $propertyName, object $object, string $message = ''): void { } /** - * @internal This method is not covered by the backward compatibility promise for PHPUnit + * Asserts that an object does not have a specified property. + * + * @throws ExpectationFailedException */ - public function setGroups(array $groups): void + final public static function assertObjectNotHasProperty(string $propertyName, object $object, string $message = ''): void { } /** + * Asserts that two variables have the same type and value. + * Used on objects, it asserts that two variables reference + * the same object. + * * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * @throws ExpectationFailedException * - * @internal This method is not covered by the backward compatibility promise for PHPUnit + * @phan-template ExpectedType + * + * @phan-param ExpectedType $expected + * + * @phan-assert =ExpectedType $actual */ - public function getName(bool $withDataSet = true): string + public static function assertSame($expected, $actual, string $message = ''): void { } /** - * Returns the size of the test. + * Asserts that two variables do not have the same type and value. + * Used on objects, it asserts that two variables do not reference + * the same object. * * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * - * @internal This method is not covered by the backward compatibility promise for PHPUnit + * @throws ExpectationFailedException */ - public function getSize(): int + public static function assertNotSame($expected, $actual, string $message = ''): void { } /** + * Asserts that a variable is of a given type. + * * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * @throws Exception + * @throws ExpectationFailedException * - * @internal This method is not covered by the backward compatibility promise for PHPUnit + * @phan-template ExpectedType of object + * + * @phan-param class-string $expected + * + * @phan-assert =ExpectedType $actual */ - public function hasSize(): bool + public static function assertInstanceOf(string $expected, $actual, string $message = ''): void { } /** + * Asserts that a variable is not of a given type. + * * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * @throws Exception + * @throws ExpectationFailedException * - * @internal This method is not covered by the backward compatibility promise for PHPUnit + * @phan-template ExpectedType of object + * + * @phan-param class-string $expected + * + * @phan-assert !ExpectedType $actual */ - public function isSmall(): bool + public static function assertNotInstanceOf(string $expected, $actual, string $message = ''): void { } /** + * Asserts that a variable is of type array. + * * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * @throws ExpectationFailedException * - * @internal This method is not covered by the backward compatibility promise for PHPUnit + * @phan-assert array $actual */ - public function isMedium(): bool + public static function assertIsArray($actual, string $message = ''): void { } /** - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * Asserts that a variable is of type bool. * - * @internal This method is not covered by the backward compatibility promise for PHPUnit + * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * @throws ExpectationFailedException + * + * @phan-assert bool $actual */ - public function isLarge(): bool + public static function assertIsBool($actual, string $message = ''): void { } /** - * @internal This method is not covered by the backward compatibility promise for PHPUnit + * Asserts that a variable is of type float. + * + * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * @throws ExpectationFailedException + * + * @phan-assert float $actual */ - public function getActualOutput(): string + public static function assertIsFloat($actual, string $message = ''): void { } /** - * @internal This method is not covered by the backward compatibility promise for PHPUnit + * Asserts that a variable is of type int. + * + * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * @throws ExpectationFailedException + * + * @phan-assert int $actual */ - public function hasOutput(): bool + public static function assertIsInt($actual, string $message = ''): void { } /** - * @internal This method is not covered by the backward compatibility promise for PHPUnit + * Asserts that a variable is of type numeric. + * + * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * @throws ExpectationFailedException + * + * @phan-assert numeric $actual */ - public function doesNotPerformAssertions(): bool + public static function assertIsNumeric($actual, string $message = ''): void { } /** - * @internal This method is not covered by the backward compatibility promise for PHPUnit + * Asserts that a variable is of type object. + * + * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * @throws ExpectationFailedException + * + * @phan-assert object $actual */ - public function hasExpectationOnOutput(): bool + public static function assertIsObject($actual, string $message = ''): void { } /** - * @internal This method is not covered by the backward compatibility promise for PHPUnit + * Asserts that a variable is of type resource. + * + * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * @throws ExpectationFailedException + * + * @phan-assert resource $actual */ - public function getExpectedException(): ?string + public static function assertIsResource($actual, string $message = ''): void { } /** - * @return null|int|string + * Asserts that a variable is of type resource and is closed. * - * @internal This method is not covered by the backward compatibility promise for PHPUnit + * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * @throws ExpectationFailedException + * + * @phan-assert resource $actual */ - public function getExpectedExceptionCode() + public static function assertIsClosedResource($actual, string $message = ''): void { } /** - * @internal This method is not covered by the backward compatibility promise for PHPUnit + * Asserts that a variable is of type string. + * + * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * @throws ExpectationFailedException + * + * @phan-assert string $actual */ - public function getExpectedExceptionMessage(): ?string + public static function assertIsString($actual, string $message = ''): void { } /** - * @internal This method is not covered by the backward compatibility promise for PHPUnit + * Asserts that a variable is of type scalar. + * + * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * @throws ExpectationFailedException + * + * @phan-assert scalar $actual */ - public function getExpectedExceptionMessageRegExp(): ?string + public static function assertIsScalar($actual, string $message = ''): void { } /** - * @internal This method is not covered by the backward compatibility promise for PHPUnit + * Asserts that a variable is of type callable. + * + * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * @throws ExpectationFailedException + * + * @phan-assert callable $actual */ - public function setRegisterMockObjectsFromTestArgumentsRecursively(bool $flag): void + public static function assertIsCallable($actual, string $message = ''): void { } /** - * @throws \Throwable + * Asserts that a variable is of type iterable. * - * @internal This method is not covered by the backward compatibility promise for PHPUnit + * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * @throws ExpectationFailedException + * + * @phan-assert iterable $actual */ - public function runBare(): void + public static function assertIsIterable($actual, string $message = ''): void { } /** - * @internal This method is not covered by the backward compatibility promise for PHPUnit + * Asserts that a variable is not of type array. + * + * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * @throws ExpectationFailedException + * + * @phan-assert !array $actual */ - public function setName(string $name): void + public static function assertIsNotArray($actual, string $message = ''): void { } /** - * @param list $dependencies + * Asserts that a variable is not of type bool. * - * @internal This method is not covered by the backward compatibility promise for PHPUnit + * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * @throws ExpectationFailedException + * + * @phan-assert !bool $actual */ - public function setDependencies(array $dependencies): void + public static function assertIsNotBool($actual, string $message = ''): void { } /** - * @internal This method is not covered by the backward compatibility promise for PHPUnit + * Asserts that a variable is not of type float. + * + * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * @throws ExpectationFailedException + * + * @phan-assert !float $actual */ - public function setDependencyInput(array $dependencyInput): void + public static function assertIsNotFloat($actual, string $message = ''): void { } /** - * @internal This method is not covered by the backward compatibility promise for PHPUnit + * Asserts that a variable is not of type int. + * + * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * @throws ExpectationFailedException + * + * @phan-assert !int $actual */ - public function setBeStrictAboutChangesToGlobalState(?bool $beStrictAboutChangesToGlobalState): void + public static function assertIsNotInt($actual, string $message = ''): void { } /** - * @internal This method is not covered by the backward compatibility promise for PHPUnit + * Asserts that a variable is not of type numeric. + * + * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * @throws ExpectationFailedException + * + * @phan-assert !numeric $actual */ - public function setBackupGlobals(?bool $backupGlobals): void + public static function assertIsNotNumeric($actual, string $message = ''): void { } /** - * @internal This method is not covered by the backward compatibility promise for PHPUnit + * Asserts that a variable is not of type object. + * + * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * @throws ExpectationFailedException + * + * @phan-assert !object $actual */ - public function setBackupStaticAttributes(?bool $backupStaticAttributes): void + public static function assertIsNotObject($actual, string $message = ''): void { } /** - * @internal This method is not covered by the backward compatibility promise for PHPUnit + * Asserts that a variable is not of type resource. + * + * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * @throws ExpectationFailedException + * + * @phan-assert !resource $actual */ - public function setRunTestInSeparateProcess(bool $runTestInSeparateProcess): void + public static function assertIsNotResource($actual, string $message = ''): void { } /** - * @internal This method is not covered by the backward compatibility promise for PHPUnit + * Asserts that a variable is not of type resource. + * + * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * @throws ExpectationFailedException + * + * @phan-assert !resource $actual */ - public function setRunClassInSeparateProcess(bool $runClassInSeparateProcess): void + public static function assertIsNotClosedResource($actual, string $message = ''): void { } /** - * @internal This method is not covered by the backward compatibility promise for PHPUnit + * Asserts that a variable is not of type string. + * + * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * @throws ExpectationFailedException + * + * @phan-assert !string $actual */ - public function setPreserveGlobalState(bool $preserveGlobalState): void + public static function assertIsNotString($actual, string $message = ''): void { } /** - * @internal This method is not covered by the backward compatibility promise for PHPUnit + * Asserts that a variable is not of type scalar. + * + * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * @throws ExpectationFailedException + * + * @phan-assert !scalar $actual */ - public function setInIsolation(bool $inIsolation): void + public static function assertIsNotScalar($actual, string $message = ''): void { } /** - * @internal This method is not covered by the backward compatibility promise for PHPUnit + * Asserts that a variable is not of type callable. + * + * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * @throws ExpectationFailedException + * + * @phan-assert !callable $actual */ - public function isInIsolation(): bool + public static function assertIsNotCallable($actual, string $message = ''): void { } /** - * @internal This method is not covered by the backward compatibility promise for PHPUnit + * Asserts that a variable is not of type iterable. + * + * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * @throws ExpectationFailedException + * + * @phan-assert !iterable $actual */ - public function getResult() + public static function assertIsNotIterable($actual, string $message = ''): void { } /** - * @internal This method is not covered by the backward compatibility promise for PHPUnit + * Asserts that a string matches a given regular expression. + * + * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * @throws ExpectationFailedException */ - public function setResult($result): void + public static function assertMatchesRegularExpression(string $pattern, string $string, string $message = ''): void { } /** - * @internal This method is not covered by the backward compatibility promise for PHPUnit + * Asserts that a string matches a given regular expression. + * + * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * @throws ExpectationFailedException + * + * @codeCoverageIgnore + * + * @deprecated https://github.com/sebastianbergmann/phpunit/issues/4086 */ - public function setOutputCallback(callable $callback): void + public static function assertRegExp(string $pattern, string $string, string $message = ''): void { } /** - * @internal This method is not covered by the backward compatibility promise for PHPUnit + * Asserts that a string does not match a given regular expression. + * + * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * @throws ExpectationFailedException */ - public function getTestResultObject(): ?\PHPUnit\Framework\TestResult + public static function assertDoesNotMatchRegularExpression(string $pattern, string $string, string $message = ''): void { } /** - * @internal This method is not covered by the backward compatibility promise for PHPUnit + * Asserts that a string does not match a given regular expression. + * + * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * @throws ExpectationFailedException + * + * @codeCoverageIgnore + * + * @deprecated https://github.com/sebastianbergmann/phpunit/issues/4089 */ - public function setTestResultObject(\PHPUnit\Framework\TestResult $result): void + public static function assertNotRegExp(string $pattern, string $string, string $message = ''): void { } /** - * @internal This method is not covered by the backward compatibility promise for PHPUnit + * Assert that the size of two arrays (or `Countable` or `Traversable` objects) + * is the same. + * + * @param \Countable|iterable $expected + * @param \Countable|iterable $actual + * + * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * @throws Exception + * @throws ExpectationFailedException */ - public function registerMockObject(\PHPUnit\Framework\MockObject\MockObject $mockObject): void + public static function assertSameSize($expected, $actual, string $message = ''): void { } /** - * @internal This method is not covered by the backward compatibility promise for PHPUnit - */ - public function addToAssertionCount(int $count): void + * Assert that the size of two arrays (or `Countable` or `Traversable` objects) + * is not the same. + * + * @param \Countable|iterable $expected + * @param \Countable|iterable $actual + * + * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * @throws Exception + * @throws ExpectationFailedException + */ + public static function assertNotSameSize($expected, $actual, string $message = ''): void { } /** - * Returns the number of assertions performed by this test. + * Asserts that a string matches a given format string. * - * @internal This method is not covered by the backward compatibility promise for PHPUnit + * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * @throws ExpectationFailedException */ - public function getNumAssertions(): int + public static function assertStringMatchesFormat(string $format, string $string, string $message = ''): void { } /** - * @internal This method is not covered by the backward compatibility promise for PHPUnit + * Asserts that a string does not match a given format string. + * + * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * @throws ExpectationFailedException */ - public function usesDataProvider(): bool + public static function assertStringNotMatchesFormat(string $format, string $string, string $message = ''): void { } /** - * @return int|string + * Asserts that a string matches a given format file. * - * @internal This method is not covered by the backward compatibility promise for PHPUnit + * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * @throws ExpectationFailedException */ - public function dataName() + public static function assertStringMatchesFormatFile(string $formatFile, string $string, string $message = ''): void { } /** - * @internal This method is not covered by the backward compatibility promise for PHPUnit + * Asserts that a string does not match a given format string. + * + * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * @throws ExpectationFailedException */ - public function getDataSetAsString(bool $includeData = true): string + public static function assertStringNotMatchesFormatFile(string $formatFile, string $string, string $message = ''): void { } /** - * Gets the data set of a TestCase. + * Asserts that a string starts with a given prefix. * - * @internal This method is not covered by the backward compatibility promise for PHPUnit + * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * @throws ExpectationFailedException */ - public function getProvidedData(): array + public static function assertStringStartsWith(string $prefix, string $string, string $message = ''): void { } /** - * @internal This method is not covered by the backward compatibility promise for PHPUnit + * Asserts that a string starts not with a given prefix. + * + * @param string $prefix + * @param string $string + * + * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * @throws ExpectationFailedException */ - public function addWarning(string $warning): void + public static function assertStringStartsNotWith($prefix, $string, string $message = ''): void { } - public function sortId(): string + /** + * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * @throws ExpectationFailedException + */ + public static function assertStringContainsString(string $needle, string $haystack, string $message = ''): void { } /** - * Returns the normalized test name as class::method. - * - * @return list + * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * @throws ExpectationFailedException */ - public function provides(): array + public static function assertStringContainsStringIgnoringCase(string $needle, string $haystack, string $message = ''): void { } /** - * Returns a list of normalized dependency names, class::method. - * - * This list can differ from the raw dependencies as the resolver has - * no need for the [!][shallow]clone prefix that is filtered out - * during normalization. - * - * @return list + * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * @throws ExpectationFailedException */ - public function requires(): array + public static function assertStringNotContainsString(string $needle, string $haystack, string $message = ''): void { } /** - * Override to run the test and assert its state. - * - * @throws \SebastianBergmann\ObjectEnumerator\InvalidArgumentException - * @throws AssertionFailedError - * @throws Exception + * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException * @throws ExpectationFailedException - * @throws \Throwable */ - protected function runTest() + public static function assertStringNotContainsStringIgnoringCase(string $needle, string $haystack, string $message = ''): void { } /** - * This method is a wrapper for the ini_set() function that automatically - * resets the modified php.ini setting to its original value after the - * test is run. + * Asserts that a string ends with a given suffix. * - * @throws Exception + * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * @throws ExpectationFailedException */ - protected function iniSet(string $varName, string $newValue): void + public static function assertStringEndsWith(string $suffix, string $string, string $message = ''): void { } /** - * This method is a wrapper for the setlocale() function that automatically - * resets the locale to its original value after the test is run. + * Asserts that a string ends not with a given suffix. * - * @throws Exception + * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * @throws ExpectationFailedException */ - protected function setLocale(...$args): void + public static function assertStringEndsNotWith(string $suffix, string $string, string $message = ''): void { } /** - * Makes configurable stub for the specified class. - * - * @phan-template RealInstanceType of object - * - * @phan-param class-string $originalClassName + * Asserts that two XML files are equal. * - * @phan-return MockObject\Stub&RealInstanceType + * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * @throws Exception + * @throws ExpectationFailedException */ - protected function createStub(string $originalClassName): \PHPUnit\Framework\MockObject\Stub + public static function assertXmlFileEqualsXmlFile(string $expectedFile, string $actualFile, string $message = ''): void { } /** - * Returns a mock object for the specified class. - * - * @phan-template RealInstanceType of object - * - * @phan-param class-string $originalClassName + * Asserts that two XML files are not equal. * - * @phan-return MockObject\MockObject&RealInstanceType + * @throws \PHPUnit\Util\Exception + * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * @throws ExpectationFailedException */ - protected function createMock(string $originalClassName): \PHPUnit\Framework\MockObject\MockObject + public static function assertXmlFileNotEqualsXmlFile(string $expectedFile, string $actualFile, string $message = ''): void { } /** - * Returns a configured mock object for the specified class. - * - * @phan-template RealInstanceType of object + * Asserts that two XML documents are equal. * - * @phan-param class-string $originalClassName + * @param \DOMDocument|string $actualXml * - * @phan-return MockObject\MockObject&RealInstanceType + * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * @throws ExpectationFailedException + * @throws \PHPUnit\Util\Xml\Exception */ - protected function createConfiguredMock(string $originalClassName, array $configuration): \PHPUnit\Framework\MockObject\MockObject + public static function assertXmlStringEqualsXmlFile(string $expectedFile, $actualXml, string $message = ''): void { } /** - * Returns a partial mock object for the specified class. - * - * @param string[] $methods - * - * @phan-template RealInstanceType of object + * Asserts that two XML documents are not equal. * - * @phan-param class-string $originalClassName + * @param \DOMDocument|string $actualXml * - * @phan-return MockObject\MockObject&RealInstanceType + * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * @throws ExpectationFailedException + * @throws \PHPUnit\Util\Xml\Exception */ - protected function createPartialMock(string $originalClassName, array $methods): \PHPUnit\Framework\MockObject\MockObject + public static function assertXmlStringNotEqualsXmlFile(string $expectedFile, $actualXml, string $message = ''): void { } /** - * Returns a test proxy for the specified class. - * - * @phan-template RealInstanceType of object + * Asserts that two XML documents are equal. * - * @phan-param class-string $originalClassName + * @param \DOMDocument|string $expectedXml + * @param \DOMDocument|string $actualXml * - * @phan-return MockObject\MockObject&RealInstanceType + * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * @throws ExpectationFailedException + * @throws \PHPUnit\Util\Xml\Exception */ - protected function createTestProxy(string $originalClassName, array $constructorArguments = []): \PHPUnit\Framework\MockObject\MockObject + public static function assertXmlStringEqualsXmlString($expectedXml, $actualXml, string $message = ''): void { } /** - * Mocks the specified class and returns the name of the mocked class. - * - * @param null|array $methods $methods - * - * @phan-template RealInstanceType of object - * - * @phan-param class-string|string $originalClassName + * Asserts that two XML documents are not equal. * - * @phan-return class-string + * @param \DOMDocument|string $expectedXml + * @param \DOMDocument|string $actualXml * - * @deprecated + * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * @throws ExpectationFailedException + * @throws \PHPUnit\Util\Xml\Exception */ - protected function getMockClass(string $originalClassName, $methods = [], array $arguments = [], string $mockClassName = '', bool $callOriginalConstructor = false, bool $callOriginalClone = true, bool $callAutoload = true, bool $cloneArguments = false): string + public static function assertXmlStringNotEqualsXmlString($expectedXml, $actualXml, string $message = ''): void { } /** - * Returns a mock object for the specified abstract class with all abstract - * methods of the class mocked. Concrete methods are not mocked by default. - * To mock concrete methods, use the 7th parameter ($mockedMethods). + * Asserts that a hierarchy of DOMElements matches. * - * @phan-template RealInstanceType of object + * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * @throws AssertionFailedError + * @throws ExpectationFailedException * - * @phan-param class-string $originalClassName + * @codeCoverageIgnore * - * @phan-return MockObject\MockObject&RealInstanceType + * @deprecated https://github.com/sebastianbergmann/phpunit/issues/4091 */ - protected function getMockForAbstractClass(string $originalClassName, array $arguments = [], string $mockClassName = '', bool $callOriginalConstructor = true, bool $callOriginalClone = true, bool $callAutoload = true, array $mockedMethods = [], bool $cloneArguments = false): \PHPUnit\Framework\MockObject\MockObject + public static function assertEqualXMLStructure(\DOMElement $expectedElement, \DOMElement $actualElement, bool $checkAttributes = false, string $message = ''): void { } /** - * Returns a mock object based on the given WSDL file. - * - * @phan-template RealInstanceType of object - * - * @phan-param class-string|string $originalClassName + * Evaluates a PHPUnit\Framework\Constraint matcher object. * - * @phan-return MockObject\MockObject&RealInstanceType + * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * @throws ExpectationFailedException */ - protected function getMockFromWsdl(string $wsdlFile, string $originalClassName = '', string $mockClassName = '', array $methods = [], bool $callOriginalConstructor = true, array $options = []): \PHPUnit\Framework\MockObject\MockObject + public static function assertThat($value, \PHPUnit\Framework\Constraint\Constraint $constraint, string $message = ''): void { } /** - * Returns a mock object for the specified trait with all abstract methods - * of the trait mocked. Concrete methods to mock can be specified with the - * `$mockedMethods` parameter. + * Asserts that a string is a valid JSON string. * - * @phan-param trait-string $traitName + * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * @throws ExpectationFailedException */ - protected function getMockForTrait(string $traitName, array $arguments = [], string $mockClassName = '', bool $callOriginalConstructor = true, bool $callOriginalClone = true, bool $callAutoload = true, array $mockedMethods = [], bool $cloneArguments = false): \PHPUnit\Framework\MockObject\MockObject + public static function assertJson(string $actualJson, string $message = ''): void { } /** - * Returns an object for the specified trait. + * Asserts that two given JSON encoded objects or arrays are equal. * - * @phan-param trait-string $traitName + * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * @throws ExpectationFailedException */ - protected function getObjectForTrait(string $traitName, array $arguments = [], string $traitClassName = '', bool $callOriginalConstructor = true, bool $callOriginalClone = true, bool $callAutoload = true): object + public static function assertJsonStringEqualsJsonString(string $expectedJson, string $actualJson, string $message = ''): void { } /** - * @throws \Prophecy\Exception\Doubler\ClassNotFoundException - * @throws \Prophecy\Exception\Doubler\DoubleException - * @throws \Prophecy\Exception\Doubler\InterfaceNotFoundException + * Asserts that two given JSON encoded objects or arrays are not equal. * - * @phan-param class-string|null $classOrInterface + * @param string $expectedJson + * @param string $actualJson * - * @deprecated https://github.com/sebastianbergmann/phpunit/issues/4141 + * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * @throws ExpectationFailedException */ - protected function prophesize(?string $classOrInterface = null): \Prophecy\Prophecy\ObjectProphecy + public static function assertJsonStringNotEqualsJsonString($expectedJson, $actualJson, string $message = ''): void { } /** - * Creates a default TestResult object. + * Asserts that the generated JSON encoded object and the content of the given file are equal. * - * @internal This method is not covered by the backward compatibility promise for PHPUnit + * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * @throws ExpectationFailedException */ - protected function createResult(): \PHPUnit\Framework\TestResult + public static function assertJsonStringEqualsJsonFile(string $expectedFile, string $actualJson, string $message = ''): void { } /** - * This method is called when a test method did not execute successfully. + * Asserts that the generated JSON encoded object and the content of the given file are not equal. * - * @throws \Throwable + * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * @throws ExpectationFailedException */ - protected function onNotSuccessfulTest(\Throwable $t): void - { - } - protected function recordDoubledType(string $originalClassName): void + public static function assertJsonStringNotEqualsJsonFile(string $expectedFile, string $actualJson, string $message = ''): void { } -} -/** - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final class TestFailure -{ /** - * Returns a description for an exception. + * Asserts that two JSON files are equal. + * + * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * @throws ExpectationFailedException */ - public static function exceptionToString(\Throwable $e): string + public static function assertJsonFileEqualsJsonFile(string $expectedFile, string $actualFile, string $message = ''): void { } /** - * Constructs a TestFailure with the given test and exception. + * Asserts that two JSON files are not equal. + * + * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * @throws ExpectationFailedException */ - public function __construct(\PHPUnit\Framework\Test $failedTest, \Throwable $t) + public static function assertJsonFileNotEqualsJsonFile(string $expectedFile, string $actualFile, string $message = ''): void { } /** - * Returns a short description of the failure. + * @throws Exception */ - public function toString(): string + public static function logicalAnd(...$func_get_args): \PHPUnit\Framework\Constraint\LogicalAnd { } - /** - * Returns a description for the thrown exception. - */ - public function getExceptionAsString(): string + public static function logicalOr(...$func_get_args): \PHPUnit\Framework\Constraint\LogicalOr { } - /** - * Returns the name of the failing test (including data set, if any). - */ - public function getTestName(): string + public static function logicalNot(\PHPUnit\Framework\Constraint\Constraint $constraint): \PHPUnit\Framework\Constraint\LogicalNot + { + } + public static function logicalXor(...$func_get_args): \PHPUnit\Framework\Constraint\LogicalXor + { + } + public static function anything(): \PHPUnit\Framework\Constraint\IsAnything + { + } + public static function isTrue(): \PHPUnit\Framework\Constraint\IsTrue { } /** - * Returns the failing test. + * @phan-template CallbackInput of mixed * - * Note: The test object is not set when the test is executed in process - * isolation. + * @phan-param callable(CallbackInput $callback): bool $callback * - * @see Exception + * @phan-return Constraint\Callback */ - public function failedTest(): ?\PHPUnit\Framework\Test + public static function callback(callable $callback): \PHPUnit\Framework\Constraint\Callback { } - /** - * Gets the thrown exception. - */ - public function thrownException(): \Throwable + public static function isFalse(): \PHPUnit\Framework\Constraint\IsFalse { } - /** - * Returns the exception's message. - */ - public function exceptionMessage(): string + public static function isJson(): \PHPUnit\Framework\Constraint\IsJson { } - /** - * Returns true if the thrown exception - * is of type AssertionFailedError. - */ - public function isFailure(): bool + public static function isNull(): \PHPUnit\Framework\Constraint\IsNull { } -} -/** - * This interface, as well as the associated mechanism for extending PHPUnit, - * will be removed in PHPUnit 10. There is no alternative available in this - * version of PHPUnit. - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @deprecated - * @see https://github.com/sebastianbergmann/phpunit/issues/4676 - */ -interface TestListener -{ - public function addError(\PHPUnit\Framework\Test $test, \Throwable $t, float $time): void; - public function addWarning(\PHPUnit\Framework\Test $test, \PHPUnit\Framework\Warning $e, float $time): void; - public function addFailure(\PHPUnit\Framework\Test $test, \PHPUnit\Framework\AssertionFailedError $e, float $time): void; - public function addIncompleteTest(\PHPUnit\Framework\Test $test, \Throwable $t, float $time): void; - public function addRiskyTest(\PHPUnit\Framework\Test $test, \Throwable $t, float $time): void; - public function addSkippedTest(\PHPUnit\Framework\Test $test, \Throwable $t, float $time): void; - public function startTestSuite(\PHPUnit\Framework\TestSuite $suite): void; - public function endTestSuite(\PHPUnit\Framework\TestSuite $suite): void; - public function startTest(\PHPUnit\Framework\Test $test): void; - public function endTest(\PHPUnit\Framework\Test $test, float $time): void; -} -/** - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -interface SelfDescribing -{ - /** - * Returns a string representation of the object. - */ - public function toString(): string; -} -/** - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -interface IncompleteTest extends \Throwable -{ -} -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - */ -interface Test extends \Countable -{ - /** - * Runs a test and collects its result in a TestResult instance. - */ - public function run(?\PHPUnit\Framework\TestResult $result = null): \PHPUnit\Framework\TestResult; -} -/** - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final class ExecutionOrderDependency -{ - public static function createFromDependsAnnotation(string $className, string $annotation): self + public static function isFinite(): \PHPUnit\Framework\Constraint\IsFinite { } - /** - * @phan-param list $dependencies - * - * @phan-return list - */ - public static function filterInvalid(array $dependencies): array + public static function isInfinite(): \PHPUnit\Framework\Constraint\IsInfinite { } - /** - * @phan-param list $existing - * @phan-param list $additional - * - * @phan-return list - */ - public static function mergeUnique(array $existing, array $additional): array + public static function isNan(): \PHPUnit\Framework\Constraint\IsNan { } - /** - * @phan-param list $left - * @phan-param list $right - * - * @phan-return list - */ - public static function diff(array $left, array $right): array + public static function containsEqual($value): \PHPUnit\Framework\Constraint\TraversableContainsEqual { } - public function __construct(string $classOrCallableName, ?string $methodName = null, ?string $option = null) + public static function containsIdentical($value): \PHPUnit\Framework\Constraint\TraversableContainsIdentical { } - public function __toString(): string + public static function containsOnly(string $type): \PHPUnit\Framework\Constraint\TraversableContainsOnly { } - public function isValid(): bool + public static function containsOnlyInstancesOf(string $className): \PHPUnit\Framework\Constraint\TraversableContainsOnly { } - public function useShallowClone(): bool + /** + * @param int|string $key + */ + public static function arrayHasKey($key): \PHPUnit\Framework\Constraint\ArrayHasKey { } - public function useDeepClone(): bool + public static function equalTo($value): \PHPUnit\Framework\Constraint\IsEqual { } - public function targetIsClass(): bool + public static function equalToCanonicalizing($value): \PHPUnit\Framework\Constraint\IsEqualCanonicalizing { } - public function getTarget(): string + public static function equalToIgnoringCase($value): \PHPUnit\Framework\Constraint\IsEqualIgnoringCase { } - public function getTargetClassName(): string + public static function equalToWithDelta($value, float $delta): \PHPUnit\Framework\Constraint\IsEqualWithDelta { } -} -/** - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final class TestBuilder -{ - public function build(\ReflectionClass $theClass, string $methodName): \PHPUnit\Framework\Test + public static function isEmpty(): \PHPUnit\Framework\Constraint\IsEmpty { } -} -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - */ -abstract class Assert -{ - /** - * Asserts that an array has a specified key. - * - * @param int|string $key - * @param array|\ArrayAccess $array - * - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * @throws Exception - * @throws ExpectationFailedException - */ - public static function assertArrayHasKey($key, $array, string $message = ''): void + public static function isWritable(): \PHPUnit\Framework\Constraint\IsWritable { } - /** - * Asserts that an array does not have a specified key. - * - * @param int|string $key - * @param array|\ArrayAccess $array - * - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * @throws Exception - * @throws ExpectationFailedException - */ - public static function assertArrayNotHasKey($key, $array, string $message = ''): void + public static function isReadable(): \PHPUnit\Framework\Constraint\IsReadable { } - /** - * Asserts that a haystack contains a needle. - * - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * @throws Exception - * @throws ExpectationFailedException - */ - public static function assertContains($needle, iterable $haystack, string $message = ''): void + public static function directoryExists(): \PHPUnit\Framework\Constraint\DirectoryExists { } - public static function assertContainsEquals($needle, iterable $haystack, string $message = ''): void + public static function fileExists(): \PHPUnit\Framework\Constraint\FileExists { } - /** - * Asserts that a haystack does not contain a needle. - * - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * @throws Exception - * @throws ExpectationFailedException - */ - public static function assertNotContains($needle, iterable $haystack, string $message = ''): void + public static function greaterThan($value): \PHPUnit\Framework\Constraint\GreaterThan { } - public static function assertNotContainsEquals($needle, iterable $haystack, string $message = ''): void + public static function greaterThanOrEqual($value): \PHPUnit\Framework\Constraint\LogicalOr { } /** - * Asserts that a haystack contains only values of a given type. - * - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * @throws ExpectationFailedException + * @deprecated https://github.com/sebastianbergmann/phpunit/issues/4601 */ - public static function assertContainsOnly(string $type, iterable $haystack, ?bool $isNativeType = null, string $message = ''): void + public static function classHasAttribute(string $attributeName): \PHPUnit\Framework\Constraint\ClassHasAttribute { } /** - * Asserts that a haystack contains only instances of a given class name. - * - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * @throws ExpectationFailedException + * @deprecated https://github.com/sebastianbergmann/phpunit/issues/4601 */ - public static function assertContainsOnlyInstancesOf(string $className, iterable $haystack, string $message = ''): void + public static function classHasStaticAttribute(string $attributeName): \PHPUnit\Framework\Constraint\ClassHasStaticAttribute { } /** - * Asserts that a haystack does not contain only values of a given type. - * - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * @throws ExpectationFailedException + * @deprecated https://github.com/sebastianbergmann/phpunit/issues/4601 */ - public static function assertNotContainsOnly(string $type, iterable $haystack, ?bool $isNativeType = null, string $message = ''): void + public static function objectHasAttribute($attributeName): \PHPUnit\Framework\Constraint\ObjectHasAttribute { } - /** - * Asserts the number of elements of an array, Countable or Traversable. - * - * @param \Countable|iterable $haystack - * - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * @throws Exception - * @throws ExpectationFailedException - */ - public static function assertCount(int $expectedCount, $haystack, string $message = ''): void - { - } - /** - * Asserts the number of elements of an array, Countable or Traversable. - * - * @param \Countable|iterable $haystack - * - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * @throws Exception - * @throws ExpectationFailedException - */ - public static function assertNotCount(int $expectedCount, $haystack, string $message = ''): void - { - } - /** - * Asserts that two variables are equal. - * - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * @throws ExpectationFailedException - */ - public static function assertEquals($expected, $actual, string $message = ''): void - { - } - /** - * Asserts that two variables are equal (canonicalizing). - * - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * @throws ExpectationFailedException - */ - public static function assertEqualsCanonicalizing($expected, $actual, string $message = ''): void - { - } - /** - * Asserts that two variables are equal (ignoring case). - * - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * @throws ExpectationFailedException - */ - public static function assertEqualsIgnoringCase($expected, $actual, string $message = ''): void - { - } - /** - * Asserts that two variables are equal (with delta). - * - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * @throws ExpectationFailedException - */ - public static function assertEqualsWithDelta($expected, $actual, float $delta, string $message = ''): void - { - } - /** - * Asserts that two variables are not equal. - * - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * @throws ExpectationFailedException - */ - public static function assertNotEquals($expected, $actual, string $message = ''): void - { - } - /** - * Asserts that two variables are not equal (canonicalizing). - * - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * @throws ExpectationFailedException - */ - public static function assertNotEqualsCanonicalizing($expected, $actual, string $message = ''): void - { - } - /** - * Asserts that two variables are not equal (ignoring case). - * - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * @throws ExpectationFailedException - */ - public static function assertNotEqualsIgnoringCase($expected, $actual, string $message = ''): void - { - } - /** - * Asserts that two variables are not equal (with delta). - * - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * @throws ExpectationFailedException - */ - public static function assertNotEqualsWithDelta($expected, $actual, float $delta, string $message = ''): void + public static function identicalTo($value): \PHPUnit\Framework\Constraint\IsIdentical { } - /** - * @throws ExpectationFailedException - */ - public static function assertObjectEquals(object $expected, object $actual, string $method = 'equals', string $message = ''): void + public static function isInstanceOf(string $className): \PHPUnit\Framework\Constraint\IsInstanceOf { } - /** - * Asserts that a variable is empty. - * - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * @throws ExpectationFailedException - * - * @phan-assert empty $actual - */ - public static function assertEmpty($actual, string $message = ''): void + public static function isType(string $type): \PHPUnit\Framework\Constraint\IsType { } - /** - * Asserts that a variable is not empty. - * - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * @throws ExpectationFailedException - * - * @phan-assert !empty $actual - */ - public static function assertNotEmpty($actual, string $message = ''): void + public static function lessThan($value): \PHPUnit\Framework\Constraint\LessThan { } - /** - * Asserts that a value is greater than another value. - * - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * @throws ExpectationFailedException - */ - public static function assertGreaterThan($expected, $actual, string $message = ''): void + public static function lessThanOrEqual($value): \PHPUnit\Framework\Constraint\LogicalOr { } - /** - * Asserts that a value is greater than or equal to another value. - * - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * @throws ExpectationFailedException - */ - public static function assertGreaterThanOrEqual($expected, $actual, string $message = ''): void + public static function matchesRegularExpression(string $pattern): \PHPUnit\Framework\Constraint\RegularExpression { } - /** - * Asserts that a value is smaller than another value. - * - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * @throws ExpectationFailedException - */ - public static function assertLessThan($expected, $actual, string $message = ''): void + public static function matches(string $string): \PHPUnit\Framework\Constraint\StringMatchesFormatDescription { } - /** - * Asserts that a value is smaller than or equal to another value. - * - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * @throws ExpectationFailedException - */ - public static function assertLessThanOrEqual($expected, $actual, string $message = ''): void + public static function stringStartsWith($prefix): \PHPUnit\Framework\Constraint\StringStartsWith { } - /** - * Asserts that the contents of one file is equal to the contents of another - * file. - * - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * @throws ExpectationFailedException - */ - public static function assertFileEquals(string $expected, string $actual, string $message = ''): void + public static function stringContains(string $string, bool $case = true): \PHPUnit\Framework\Constraint\StringContains { } - /** - * Asserts that the contents of one file is equal to the contents of another - * file (canonicalizing). - * - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * @throws ExpectationFailedException - */ - public static function assertFileEqualsCanonicalizing(string $expected, string $actual, string $message = ''): void + public static function stringEndsWith(string $suffix): \PHPUnit\Framework\Constraint\StringEndsWith { } - /** - * Asserts that the contents of one file is equal to the contents of another - * file (ignoring case). - * - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * @throws ExpectationFailedException - */ - public static function assertFileEqualsIgnoringCase(string $expected, string $actual, string $message = ''): void + public static function countOf(int $count): \PHPUnit\Framework\Constraint\Count { } - /** - * Asserts that the contents of one file is not equal to the contents of - * another file. - * - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * @throws ExpectationFailedException - */ - public static function assertFileNotEquals(string $expected, string $actual, string $message = ''): void + public static function objectEquals(object $object, string $method = 'equals'): \PHPUnit\Framework\Constraint\ObjectEquals { } /** - * Asserts that the contents of one file is not equal to the contents of another - * file (canonicalizing). + * Fails a test with the given message. * - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * @throws ExpectationFailedException - */ - public static function assertFileNotEqualsCanonicalizing(string $expected, string $actual, string $message = ''): void - { - } - /** - * Asserts that the contents of one file is not equal to the contents of another - * file (ignoring case). + * @throws AssertionFailedError * - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * @throws ExpectationFailedException + * @phan-return never-return */ - public static function assertFileNotEqualsIgnoringCase(string $expected, string $actual, string $message = ''): void + public static function fail(string $message = ''): void { } /** - * Asserts that the contents of a string is equal - * to the contents of a file. + * Mark the test as incomplete. * - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * @throws ExpectationFailedException - */ - public static function assertStringEqualsFile(string $expectedFile, string $actualString, string $message = ''): void - { - } - /** - * Asserts that the contents of a string is equal - * to the contents of a file (canonicalizing). + * @throws IncompleteTestError * - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * @throws ExpectationFailedException + * @phan-return never-return */ - public static function assertStringEqualsFileCanonicalizing(string $expectedFile, string $actualString, string $message = ''): void + public static function markTestIncomplete(string $message = ''): void { } /** - * Asserts that the contents of a string is equal - * to the contents of a file (ignoring case). + * Mark the test as skipped. * - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * @throws ExpectationFailedException - */ - public static function assertStringEqualsFileIgnoringCase(string $expectedFile, string $actualString, string $message = ''): void - { - } - /** - * Asserts that the contents of a string is not equal - * to the contents of a file. + * @throws SkippedTestError + * @throws SyntheticSkippedError * - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * @throws ExpectationFailedException + * @phan-return never-return */ - public static function assertStringNotEqualsFile(string $expectedFile, string $actualString, string $message = ''): void + public static function markTestSkipped(string $message = ''): void { } /** - * Asserts that the contents of a string is not equal - * to the contents of a file (canonicalizing). - * - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * @throws ExpectationFailedException + * Return the current assertion count. */ - public static function assertStringNotEqualsFileCanonicalizing(string $expectedFile, string $actualString, string $message = ''): void + public static function getCount(): int { } /** - * Asserts that the contents of a string is not equal - * to the contents of a file (ignoring case). - * - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * @throws ExpectationFailedException + * Reset the assertion counter. */ - public static function assertStringNotEqualsFileIgnoringCase(string $expectedFile, string $actualString, string $message = ''): void - { - } - /** - * Asserts that a file/dir is readable. - * - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * @throws ExpectationFailedException - */ - public static function assertIsReadable(string $filename, string $message = ''): void - { - } - /** - * Asserts that a file/dir exists and is not readable. - * - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * @throws ExpectationFailedException - */ - public static function assertIsNotReadable(string $filename, string $message = ''): void - { - } - /** - * Asserts that a file/dir exists and is not readable. - * - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * @throws ExpectationFailedException - * - * @codeCoverageIgnore - * - * @deprecated https://github.com/sebastianbergmann/phpunit/issues/4062 - */ - public static function assertNotIsReadable(string $filename, string $message = ''): void - { - } - /** - * Asserts that a file/dir exists and is writable. - * - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * @throws ExpectationFailedException - */ - public static function assertIsWritable(string $filename, string $message = ''): void - { - } - /** - * Asserts that a file/dir exists and is not writable. - * - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * @throws ExpectationFailedException - */ - public static function assertIsNotWritable(string $filename, string $message = ''): void - { - } - /** - * Asserts that a file/dir exists and is not writable. - * - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * @throws ExpectationFailedException - * - * @codeCoverageIgnore - * - * @deprecated https://github.com/sebastianbergmann/phpunit/issues/4065 - */ - public static function assertNotIsWritable(string $filename, string $message = ''): void - { - } - /** - * Asserts that a directory exists. - * - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * @throws ExpectationFailedException - */ - public static function assertDirectoryExists(string $directory, string $message = ''): void - { - } - /** - * Asserts that a directory does not exist. - * - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * @throws ExpectationFailedException - */ - public static function assertDirectoryDoesNotExist(string $directory, string $message = ''): void - { - } - /** - * Asserts that a directory does not exist. - * - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * @throws ExpectationFailedException - * - * @codeCoverageIgnore - * - * @deprecated https://github.com/sebastianbergmann/phpunit/issues/4068 - */ - public static function assertDirectoryNotExists(string $directory, string $message = ''): void - { - } - /** - * Asserts that a directory exists and is readable. - * - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * @throws ExpectationFailedException - */ - public static function assertDirectoryIsReadable(string $directory, string $message = ''): void - { - } - /** - * Asserts that a directory exists and is not readable. - * - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * @throws ExpectationFailedException - */ - public static function assertDirectoryIsNotReadable(string $directory, string $message = ''): void - { - } - /** - * Asserts that a directory exists and is not readable. - * - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * @throws ExpectationFailedException - * - * @codeCoverageIgnore - * - * @deprecated https://github.com/sebastianbergmann/phpunit/issues/4071 - */ - public static function assertDirectoryNotIsReadable(string $directory, string $message = ''): void - { - } - /** - * Asserts that a directory exists and is writable. - * - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * @throws ExpectationFailedException - */ - public static function assertDirectoryIsWritable(string $directory, string $message = ''): void - { - } - /** - * Asserts that a directory exists and is not writable. - * - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * @throws ExpectationFailedException - */ - public static function assertDirectoryIsNotWritable(string $directory, string $message = ''): void - { - } - /** - * Asserts that a directory exists and is not writable. - * - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * @throws ExpectationFailedException - * - * @codeCoverageIgnore - * - * @deprecated https://github.com/sebastianbergmann/phpunit/issues/4074 - */ - public static function assertDirectoryNotIsWritable(string $directory, string $message = ''): void - { - } - /** - * Asserts that a file exists. - * - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * @throws ExpectationFailedException - */ - public static function assertFileExists(string $filename, string $message = ''): void - { - } - /** - * Asserts that a file does not exist. - * - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * @throws ExpectationFailedException - */ - public static function assertFileDoesNotExist(string $filename, string $message = ''): void - { - } - /** - * Asserts that a file does not exist. - * - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * @throws ExpectationFailedException - * - * @codeCoverageIgnore - * - * @deprecated https://github.com/sebastianbergmann/phpunit/issues/4077 - */ - public static function assertFileNotExists(string $filename, string $message = ''): void - { - } - /** - * Asserts that a file exists and is readable. - * - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * @throws ExpectationFailedException - */ - public static function assertFileIsReadable(string $file, string $message = ''): void - { - } - /** - * Asserts that a file exists and is not readable. - * - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * @throws ExpectationFailedException - */ - public static function assertFileIsNotReadable(string $file, string $message = ''): void - { - } - /** - * Asserts that a file exists and is not readable. - * - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * @throws ExpectationFailedException - * - * @codeCoverageIgnore - * - * @deprecated https://github.com/sebastianbergmann/phpunit/issues/4080 - */ - public static function assertFileNotIsReadable(string $file, string $message = ''): void - { - } - /** - * Asserts that a file exists and is writable. - * - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * @throws ExpectationFailedException - */ - public static function assertFileIsWritable(string $file, string $message = ''): void - { - } - /** - * Asserts that a file exists and is not writable. - * - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * @throws ExpectationFailedException - */ - public static function assertFileIsNotWritable(string $file, string $message = ''): void - { - } - /** - * Asserts that a file exists and is not writable. - * - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * @throws ExpectationFailedException - * - * @codeCoverageIgnore - * - * @deprecated https://github.com/sebastianbergmann/phpunit/issues/4083 - */ - public static function assertFileNotIsWritable(string $file, string $message = ''): void - { - } - /** - * Asserts that a condition is true. - * - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * @throws ExpectationFailedException - * - * @phan-assert true $condition - */ - public static function assertTrue($condition, string $message = ''): void - { - } - /** - * Asserts that a condition is not true. - * - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * @throws ExpectationFailedException - * - * @phan-assert !true $condition - */ - public static function assertNotTrue($condition, string $message = ''): void - { - } - /** - * Asserts that a condition is false. - * - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * @throws ExpectationFailedException - * - * @phan-assert false $condition - */ - public static function assertFalse($condition, string $message = ''): void - { - } - /** - * Asserts that a condition is not false. - * - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * @throws ExpectationFailedException - * - * @phan-assert !false $condition - */ - public static function assertNotFalse($condition, string $message = ''): void - { - } - /** - * Asserts that a variable is null. - * - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * @throws ExpectationFailedException - * - * @phan-assert null $actual - */ - public static function assertNull($actual, string $message = ''): void - { - } - /** - * Asserts that a variable is not null. - * - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * @throws ExpectationFailedException - * - * @phan-assert !null $actual - */ - public static function assertNotNull($actual, string $message = ''): void - { - } - /** - * Asserts that a variable is finite. - * - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * @throws ExpectationFailedException - */ - public static function assertFinite($actual, string $message = ''): void - { - } - /** - * Asserts that a variable is infinite. - * - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * @throws ExpectationFailedException - */ - public static function assertInfinite($actual, string $message = ''): void - { - } - /** - * Asserts that a variable is nan. - * - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * @throws ExpectationFailedException - */ - public static function assertNan($actual, string $message = ''): void - { - } - /** - * Asserts that a class has a specified attribute. - * - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * @throws Exception - * @throws ExpectationFailedException - * - * @deprecated https://github.com/sebastianbergmann/phpunit/issues/4601 - */ - public static function assertClassHasAttribute(string $attributeName, string $className, string $message = ''): void - { - } - /** - * Asserts that a class does not have a specified attribute. - * - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * @throws Exception - * @throws ExpectationFailedException - * - * @deprecated https://github.com/sebastianbergmann/phpunit/issues/4601 - */ - public static function assertClassNotHasAttribute(string $attributeName, string $className, string $message = ''): void - { - } - /** - * Asserts that a class has a specified static attribute. - * - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * @throws Exception - * @throws ExpectationFailedException - * - * @deprecated https://github.com/sebastianbergmann/phpunit/issues/4601 - */ - public static function assertClassHasStaticAttribute(string $attributeName, string $className, string $message = ''): void - { - } - /** - * Asserts that a class does not have a specified static attribute. - * - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * @throws Exception - * @throws ExpectationFailedException - * - * @deprecated https://github.com/sebastianbergmann/phpunit/issues/4601 - */ - public static function assertClassNotHasStaticAttribute(string $attributeName, string $className, string $message = ''): void - { - } - /** - * Asserts that an object has a specified attribute. - * - * @param object $object - * - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * @throws Exception - * @throws ExpectationFailedException - * - * @deprecated https://github.com/sebastianbergmann/phpunit/issues/4601 - */ - public static function assertObjectHasAttribute(string $attributeName, $object, string $message = ''): void - { - } - /** - * Asserts that an object does not have a specified attribute. - * - * @param object $object - * - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * @throws Exception - * @throws ExpectationFailedException - * - * @deprecated https://github.com/sebastianbergmann/phpunit/issues/4601 - */ - public static function assertObjectNotHasAttribute(string $attributeName, $object, string $message = ''): void - { - } - /** - * Asserts that an object has a specified property. - * - * @throws ExpectationFailedException - */ - final public static function assertObjectHasProperty(string $propertyName, object $object, string $message = ''): void - { - } - /** - * Asserts that an object does not have a specified property. - * - * @throws ExpectationFailedException - */ - final public static function assertObjectNotHasProperty(string $propertyName, object $object, string $message = ''): void - { - } - /** - * Asserts that two variables have the same type and value. - * Used on objects, it asserts that two variables reference - * the same object. - * - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * @throws ExpectationFailedException - * - * @phan-template ExpectedType - * - * @phan-param ExpectedType $expected - * - * @phan-assert =ExpectedType $actual - */ - public static function assertSame($expected, $actual, string $message = ''): void - { - } - /** - * Asserts that two variables do not have the same type and value. - * Used on objects, it asserts that two variables do not reference - * the same object. - * - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * @throws ExpectationFailedException - */ - public static function assertNotSame($expected, $actual, string $message = ''): void - { - } - /** - * Asserts that a variable is of a given type. - * - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * @throws Exception - * @throws ExpectationFailedException - * - * @phan-template ExpectedType of object - * - * @phan-param class-string $expected - * - * @phan-assert =ExpectedType $actual - */ - public static function assertInstanceOf(string $expected, $actual, string $message = ''): void - { - } - /** - * Asserts that a variable is not of a given type. - * - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * @throws Exception - * @throws ExpectationFailedException - * - * @phan-template ExpectedType of object - * - * @phan-param class-string $expected - * - * @phan-assert !ExpectedType $actual - */ - public static function assertNotInstanceOf(string $expected, $actual, string $message = ''): void - { - } - /** - * Asserts that a variable is of type array. - * - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * @throws ExpectationFailedException - * - * @phan-assert array $actual - */ - public static function assertIsArray($actual, string $message = ''): void - { - } - /** - * Asserts that a variable is of type bool. - * - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * @throws ExpectationFailedException - * - * @phan-assert bool $actual - */ - public static function assertIsBool($actual, string $message = ''): void - { - } - /** - * Asserts that a variable is of type float. - * - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * @throws ExpectationFailedException - * - * @phan-assert float $actual - */ - public static function assertIsFloat($actual, string $message = ''): void - { - } - /** - * Asserts that a variable is of type int. - * - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * @throws ExpectationFailedException - * - * @phan-assert int $actual - */ - public static function assertIsInt($actual, string $message = ''): void - { - } - /** - * Asserts that a variable is of type numeric. - * - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * @throws ExpectationFailedException - * - * @phan-assert numeric $actual - */ - public static function assertIsNumeric($actual, string $message = ''): void - { - } - /** - * Asserts that a variable is of type object. - * - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * @throws ExpectationFailedException - * - * @phan-assert object $actual - */ - public static function assertIsObject($actual, string $message = ''): void - { - } - /** - * Asserts that a variable is of type resource. - * - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * @throws ExpectationFailedException - * - * @phan-assert resource $actual - */ - public static function assertIsResource($actual, string $message = ''): void - { - } - /** - * Asserts that a variable is of type resource and is closed. - * - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * @throws ExpectationFailedException - * - * @phan-assert resource $actual - */ - public static function assertIsClosedResource($actual, string $message = ''): void - { - } - /** - * Asserts that a variable is of type string. - * - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * @throws ExpectationFailedException - * - * @phan-assert string $actual - */ - public static function assertIsString($actual, string $message = ''): void - { - } - /** - * Asserts that a variable is of type scalar. - * - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * @throws ExpectationFailedException - * - * @phan-assert scalar $actual - */ - public static function assertIsScalar($actual, string $message = ''): void - { - } - /** - * Asserts that a variable is of type callable. - * - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * @throws ExpectationFailedException - * - * @phan-assert callable $actual - */ - public static function assertIsCallable($actual, string $message = ''): void - { - } - /** - * Asserts that a variable is of type iterable. - * - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * @throws ExpectationFailedException - * - * @phan-assert iterable $actual - */ - public static function assertIsIterable($actual, string $message = ''): void - { - } - /** - * Asserts that a variable is not of type array. - * - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * @throws ExpectationFailedException - * - * @phan-assert !array $actual - */ - public static function assertIsNotArray($actual, string $message = ''): void - { - } - /** - * Asserts that a variable is not of type bool. - * - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * @throws ExpectationFailedException - * - * @phan-assert !bool $actual - */ - public static function assertIsNotBool($actual, string $message = ''): void - { - } - /** - * Asserts that a variable is not of type float. - * - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * @throws ExpectationFailedException - * - * @phan-assert !float $actual - */ - public static function assertIsNotFloat($actual, string $message = ''): void - { - } - /** - * Asserts that a variable is not of type int. - * - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * @throws ExpectationFailedException - * - * @phan-assert !int $actual - */ - public static function assertIsNotInt($actual, string $message = ''): void - { - } - /** - * Asserts that a variable is not of type numeric. - * - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * @throws ExpectationFailedException - * - * @phan-assert !numeric $actual - */ - public static function assertIsNotNumeric($actual, string $message = ''): void - { - } - /** - * Asserts that a variable is not of type object. - * - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * @throws ExpectationFailedException - * - * @phan-assert !object $actual - */ - public static function assertIsNotObject($actual, string $message = ''): void - { - } - /** - * Asserts that a variable is not of type resource. - * - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * @throws ExpectationFailedException - * - * @phan-assert !resource $actual - */ - public static function assertIsNotResource($actual, string $message = ''): void - { - } - /** - * Asserts that a variable is not of type resource. - * - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * @throws ExpectationFailedException - * - * @phan-assert !resource $actual - */ - public static function assertIsNotClosedResource($actual, string $message = ''): void - { - } - /** - * Asserts that a variable is not of type string. - * - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * @throws ExpectationFailedException - * - * @phan-assert !string $actual - */ - public static function assertIsNotString($actual, string $message = ''): void - { - } - /** - * Asserts that a variable is not of type scalar. - * - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * @throws ExpectationFailedException - * - * @phan-assert !scalar $actual - */ - public static function assertIsNotScalar($actual, string $message = ''): void - { - } - /** - * Asserts that a variable is not of type callable. - * - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * @throws ExpectationFailedException - * - * @phan-assert !callable $actual - */ - public static function assertIsNotCallable($actual, string $message = ''): void - { - } - /** - * Asserts that a variable is not of type iterable. - * - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * @throws ExpectationFailedException - * - * @phan-assert !iterable $actual - */ - public static function assertIsNotIterable($actual, string $message = ''): void - { - } - /** - * Asserts that a string matches a given regular expression. - * - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * @throws ExpectationFailedException - */ - public static function assertMatchesRegularExpression(string $pattern, string $string, string $message = ''): void - { - } - /** - * Asserts that a string matches a given regular expression. - * - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * @throws ExpectationFailedException - * - * @codeCoverageIgnore - * - * @deprecated https://github.com/sebastianbergmann/phpunit/issues/4086 - */ - public static function assertRegExp(string $pattern, string $string, string $message = ''): void - { - } - /** - * Asserts that a string does not match a given regular expression. - * - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * @throws ExpectationFailedException - */ - public static function assertDoesNotMatchRegularExpression(string $pattern, string $string, string $message = ''): void - { - } - /** - * Asserts that a string does not match a given regular expression. - * - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * @throws ExpectationFailedException - * - * @codeCoverageIgnore - * - * @deprecated https://github.com/sebastianbergmann/phpunit/issues/4089 - */ - public static function assertNotRegExp(string $pattern, string $string, string $message = ''): void - { - } - /** - * Assert that the size of two arrays (or `Countable` or `Traversable` objects) - * is the same. - * - * @param \Countable|iterable $expected - * @param \Countable|iterable $actual - * - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * @throws Exception - * @throws ExpectationFailedException - */ - public static function assertSameSize($expected, $actual, string $message = ''): void - { - } - /** - * Assert that the size of two arrays (or `Countable` or `Traversable` objects) - * is not the same. - * - * @param \Countable|iterable $expected - * @param \Countable|iterable $actual - * - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * @throws Exception - * @throws ExpectationFailedException - */ - public static function assertNotSameSize($expected, $actual, string $message = ''): void - { - } - /** - * Asserts that a string matches a given format string. - * - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * @throws ExpectationFailedException - */ - public static function assertStringMatchesFormat(string $format, string $string, string $message = ''): void - { - } - /** - * Asserts that a string does not match a given format string. - * - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * @throws ExpectationFailedException - */ - public static function assertStringNotMatchesFormat(string $format, string $string, string $message = ''): void - { - } - /** - * Asserts that a string matches a given format file. - * - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * @throws ExpectationFailedException - */ - public static function assertStringMatchesFormatFile(string $formatFile, string $string, string $message = ''): void - { - } - /** - * Asserts that a string does not match a given format string. - * - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * @throws ExpectationFailedException - */ - public static function assertStringNotMatchesFormatFile(string $formatFile, string $string, string $message = ''): void - { - } - /** - * Asserts that a string starts with a given prefix. - * - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * @throws ExpectationFailedException - */ - public static function assertStringStartsWith(string $prefix, string $string, string $message = ''): void - { - } - /** - * Asserts that a string starts not with a given prefix. - * - * @param string $prefix - * @param string $string - * - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * @throws ExpectationFailedException - */ - public static function assertStringStartsNotWith($prefix, $string, string $message = ''): void - { - } - /** - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * @throws ExpectationFailedException - */ - public static function assertStringContainsString(string $needle, string $haystack, string $message = ''): void - { - } - /** - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * @throws ExpectationFailedException - */ - public static function assertStringContainsStringIgnoringCase(string $needle, string $haystack, string $message = ''): void - { - } - /** - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * @throws ExpectationFailedException - */ - public static function assertStringNotContainsString(string $needle, string $haystack, string $message = ''): void - { - } - /** - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * @throws ExpectationFailedException - */ - public static function assertStringNotContainsStringIgnoringCase(string $needle, string $haystack, string $message = ''): void - { - } - /** - * Asserts that a string ends with a given suffix. - * - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * @throws ExpectationFailedException - */ - public static function assertStringEndsWith(string $suffix, string $string, string $message = ''): void - { - } - /** - * Asserts that a string ends not with a given suffix. - * - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * @throws ExpectationFailedException - */ - public static function assertStringEndsNotWith(string $suffix, string $string, string $message = ''): void - { - } - /** - * Asserts that two XML files are equal. - * - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * @throws Exception - * @throws ExpectationFailedException - */ - public static function assertXmlFileEqualsXmlFile(string $expectedFile, string $actualFile, string $message = ''): void - { - } - /** - * Asserts that two XML files are not equal. - * - * @throws \PHPUnit\Util\Exception - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * @throws ExpectationFailedException - */ - public static function assertXmlFileNotEqualsXmlFile(string $expectedFile, string $actualFile, string $message = ''): void - { - } - /** - * Asserts that two XML documents are equal. - * - * @param \DOMDocument|string $actualXml - * - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * @throws ExpectationFailedException - * @throws \PHPUnit\Util\Xml\Exception - */ - public static function assertXmlStringEqualsXmlFile(string $expectedFile, $actualXml, string $message = ''): void - { - } - /** - * Asserts that two XML documents are not equal. - * - * @param \DOMDocument|string $actualXml - * - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * @throws ExpectationFailedException - * @throws \PHPUnit\Util\Xml\Exception - */ - public static function assertXmlStringNotEqualsXmlFile(string $expectedFile, $actualXml, string $message = ''): void - { - } - /** - * Asserts that two XML documents are equal. - * - * @param \DOMDocument|string $expectedXml - * @param \DOMDocument|string $actualXml - * - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * @throws ExpectationFailedException - * @throws \PHPUnit\Util\Xml\Exception - */ - public static function assertXmlStringEqualsXmlString($expectedXml, $actualXml, string $message = ''): void - { - } - /** - * Asserts that two XML documents are not equal. - * - * @param \DOMDocument|string $expectedXml - * @param \DOMDocument|string $actualXml - * - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * @throws ExpectationFailedException - * @throws \PHPUnit\Util\Xml\Exception - */ - public static function assertXmlStringNotEqualsXmlString($expectedXml, $actualXml, string $message = ''): void - { - } - /** - * Asserts that a hierarchy of DOMElements matches. - * - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * @throws AssertionFailedError - * @throws ExpectationFailedException - * - * @codeCoverageIgnore - * - * @deprecated https://github.com/sebastianbergmann/phpunit/issues/4091 - */ - public static function assertEqualXMLStructure(\DOMElement $expectedElement, \DOMElement $actualElement, bool $checkAttributes = false, string $message = ''): void - { - } - /** - * Evaluates a PHPUnit\Framework\Constraint matcher object. - * - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * @throws ExpectationFailedException - */ - public static function assertThat($value, \PHPUnit\Framework\Constraint\Constraint $constraint, string $message = ''): void - { - } - /** - * Asserts that a string is a valid JSON string. - * - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * @throws ExpectationFailedException - */ - public static function assertJson(string $actualJson, string $message = ''): void - { - } - /** - * Asserts that two given JSON encoded objects or arrays are equal. - * - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * @throws ExpectationFailedException - */ - public static function assertJsonStringEqualsJsonString(string $expectedJson, string $actualJson, string $message = ''): void - { - } - /** - * Asserts that two given JSON encoded objects or arrays are not equal. - * - * @param string $expectedJson - * @param string $actualJson - * - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * @throws ExpectationFailedException - */ - public static function assertJsonStringNotEqualsJsonString($expectedJson, $actualJson, string $message = ''): void - { - } - /** - * Asserts that the generated JSON encoded object and the content of the given file are equal. - * - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * @throws ExpectationFailedException - */ - public static function assertJsonStringEqualsJsonFile(string $expectedFile, string $actualJson, string $message = ''): void - { - } - /** - * Asserts that the generated JSON encoded object and the content of the given file are not equal. - * - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * @throws ExpectationFailedException - */ - public static function assertJsonStringNotEqualsJsonFile(string $expectedFile, string $actualJson, string $message = ''): void - { - } - /** - * Asserts that two JSON files are equal. - * - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * @throws ExpectationFailedException - */ - public static function assertJsonFileEqualsJsonFile(string $expectedFile, string $actualFile, string $message = ''): void - { - } - /** - * Asserts that two JSON files are not equal. - * - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * @throws ExpectationFailedException - */ - public static function assertJsonFileNotEqualsJsonFile(string $expectedFile, string $actualFile, string $message = ''): void - { - } - /** - * @throws Exception - */ - public static function logicalAnd(...$func_get_args): \PHPUnit\Framework\Constraint\LogicalAnd - { - } - public static function logicalOr(...$func_get_args): \PHPUnit\Framework\Constraint\LogicalOr - { - } - public static function logicalNot(\PHPUnit\Framework\Constraint\Constraint $constraint): \PHPUnit\Framework\Constraint\LogicalNot - { - } - public static function logicalXor(...$func_get_args): \PHPUnit\Framework\Constraint\LogicalXor - { - } - public static function anything(): \PHPUnit\Framework\Constraint\IsAnything - { - } - public static function isTrue(): \PHPUnit\Framework\Constraint\IsTrue - { - } - /** - * @phan-template CallbackInput of mixed - * - * @phan-param callable(CallbackInput $callback): bool $callback - * - * @phan-return Constraint\Callback - */ - public static function callback(callable $callback): \PHPUnit\Framework\Constraint\Callback - { - } - public static function isFalse(): \PHPUnit\Framework\Constraint\IsFalse - { - } - public static function isJson(): \PHPUnit\Framework\Constraint\IsJson - { - } - public static function isNull(): \PHPUnit\Framework\Constraint\IsNull - { - } - public static function isFinite(): \PHPUnit\Framework\Constraint\IsFinite - { - } - public static function isInfinite(): \PHPUnit\Framework\Constraint\IsInfinite - { - } - public static function isNan(): \PHPUnit\Framework\Constraint\IsNan - { - } - public static function containsEqual($value): \PHPUnit\Framework\Constraint\TraversableContainsEqual - { - } - public static function containsIdentical($value): \PHPUnit\Framework\Constraint\TraversableContainsIdentical - { - } - public static function containsOnly(string $type): \PHPUnit\Framework\Constraint\TraversableContainsOnly - { - } - public static function containsOnlyInstancesOf(string $className): \PHPUnit\Framework\Constraint\TraversableContainsOnly - { - } - /** - * @param int|string $key - */ - public static function arrayHasKey($key): \PHPUnit\Framework\Constraint\ArrayHasKey - { - } - public static function equalTo($value): \PHPUnit\Framework\Constraint\IsEqual - { - } - public static function equalToCanonicalizing($value): \PHPUnit\Framework\Constraint\IsEqualCanonicalizing - { - } - public static function equalToIgnoringCase($value): \PHPUnit\Framework\Constraint\IsEqualIgnoringCase - { - } - public static function equalToWithDelta($value, float $delta): \PHPUnit\Framework\Constraint\IsEqualWithDelta - { - } - public static function isEmpty(): \PHPUnit\Framework\Constraint\IsEmpty - { - } - public static function isWritable(): \PHPUnit\Framework\Constraint\IsWritable - { - } - public static function isReadable(): \PHPUnit\Framework\Constraint\IsReadable - { - } - public static function directoryExists(): \PHPUnit\Framework\Constraint\DirectoryExists - { - } - public static function fileExists(): \PHPUnit\Framework\Constraint\FileExists - { - } - public static function greaterThan($value): \PHPUnit\Framework\Constraint\GreaterThan - { - } - public static function greaterThanOrEqual($value): \PHPUnit\Framework\Constraint\LogicalOr - { - } - /** - * @deprecated https://github.com/sebastianbergmann/phpunit/issues/4601 - */ - public static function classHasAttribute(string $attributeName): \PHPUnit\Framework\Constraint\ClassHasAttribute - { - } - /** - * @deprecated https://github.com/sebastianbergmann/phpunit/issues/4601 - */ - public static function classHasStaticAttribute(string $attributeName): \PHPUnit\Framework\Constraint\ClassHasStaticAttribute - { - } - /** - * @deprecated https://github.com/sebastianbergmann/phpunit/issues/4601 - */ - public static function objectHasAttribute($attributeName): \PHPUnit\Framework\Constraint\ObjectHasAttribute - { - } - public static function identicalTo($value): \PHPUnit\Framework\Constraint\IsIdentical - { - } - public static function isInstanceOf(string $className): \PHPUnit\Framework\Constraint\IsInstanceOf - { - } - public static function isType(string $type): \PHPUnit\Framework\Constraint\IsType - { - } - public static function lessThan($value): \PHPUnit\Framework\Constraint\LessThan - { - } - public static function lessThanOrEqual($value): \PHPUnit\Framework\Constraint\LogicalOr - { - } - public static function matchesRegularExpression(string $pattern): \PHPUnit\Framework\Constraint\RegularExpression - { - } - public static function matches(string $string): \PHPUnit\Framework\Constraint\StringMatchesFormatDescription - { - } - public static function stringStartsWith($prefix): \PHPUnit\Framework\Constraint\StringStartsWith - { - } - public static function stringContains(string $string, bool $case = true): \PHPUnit\Framework\Constraint\StringContains - { - } - public static function stringEndsWith(string $suffix): \PHPUnit\Framework\Constraint\StringEndsWith - { - } - public static function countOf(int $count): \PHPUnit\Framework\Constraint\Count - { - } - public static function objectEquals(object $object, string $method = 'equals'): \PHPUnit\Framework\Constraint\ObjectEquals - { - } - /** - * Fails a test with the given message. - * - * @throws AssertionFailedError - * - * @phan-return never-return - */ - public static function fail(string $message = ''): void - { - } - /** - * Mark the test as incomplete. - * - * @throws IncompleteTestError - * - * @phan-return never-return - */ - public static function markTestIncomplete(string $message = ''): void - { - } - /** - * Mark the test as skipped. - * - * @throws SkippedTestError - * @throws SyntheticSkippedError - * - * @phan-return never-return - */ - public static function markTestSkipped(string $message = ''): void - { - } - /** - * Return the current assertion count. - */ - public static function getCount(): int - { - } - /** - * Reset the assertion counter. - */ - public static function resetCount(): void - { - } -} -/** - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -interface SkippedTest extends \Throwable -{ -} -/** - * @template-implements \IteratorAggregate - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -class TestSuite implements \IteratorAggregate, \PHPUnit\Framework\Reorderable, \PHPUnit\Framework\SelfDescribing, \PHPUnit\Framework\Test -{ - /** - * Enable or disable the backup and restoration of the $GLOBALS array. - * - * @var bool - */ - protected $backupGlobals; - /** - * Enable or disable the backup and restoration of static attributes. - * - * @var bool - */ - protected $backupStaticAttributes; - /** - * @var bool - */ - protected $runTestInSeparateProcess = false; - /** - * The name of the test suite. - * - * @var string - */ - protected $name = ''; - /** - * The test groups of the test suite. - * - * @phan-var array> - */ - protected $groups = []; - /** - * The tests in the test suite. - * - * @var Test[] - */ - protected $tests = []; - /** - * The number of tests in the test suite. - * - * @var int - */ - protected $numTests = -1; - /** - * @var bool - */ - protected $testCase = false; - /** - * @var string[] - */ - protected $foundClasses = []; - /** - * @var null|list - */ - protected $providedTests; - /** - * @var null|list - */ - protected $requiredTests; - /** - * Constructs a new TestSuite. - * - * - PHPUnit\Framework\TestSuite() constructs an empty TestSuite. - * - * - PHPUnit\Framework\TestSuite(ReflectionClass) constructs a - * TestSuite from the given class. - * - * - PHPUnit\Framework\TestSuite(ReflectionClass, String) - * constructs a TestSuite from the given class with the given - * name. - * - * - PHPUnit\Framework\TestSuite(String) either constructs a - * TestSuite from the given class (if the passed string is the - * name of an existing class) or constructs an empty TestSuite - * with the given name. - * - * @param \ReflectionClass|string $theClass - * - * @throws Exception - */ - public function __construct($theClass = '', string $name = '') - { - } - /** - * Returns a string representation of the test suite. - */ - public function toString(): string - { - } - /** - * Adds a test to the suite. - * - * @param array $groups - */ - public function addTest(\PHPUnit\Framework\Test $test, $groups = []): void - { - } - /** - * Adds the tests from the given class to the suite. - * - * @phan-param object|class-string $testClass - * - * @throws Exception - */ - public function addTestSuite($testClass): void - { - } - public function addWarning(string $warning): void - { - } - /** - * Wraps both addTest() and addTestSuite - * as well as the separate import statements for the user's convenience. - * - * If the named file cannot be read or there are no new tests that can be - * added, a PHPUnit\Framework\WarningTestCase will be created instead, - * leaving the current test run untouched. - * - * @throws Exception - */ - public function addTestFile(string $filename): void - { - } - /** - * Wrapper for addTestFile() that adds multiple test files. - * - * @throws Exception - */ - public function addTestFiles(iterable $fileNames): void - { - } - /** - * Counts the number of test cases that will be run by this test. - * - * @todo refactor usage of numTests in DefaultResultPrinter - */ - public function count(): int - { - } - /** - * Returns the name of the suite. - */ - public function getName(): string - { - } - /** - * Returns the test groups of the suite. - * - * @phan-return list - */ - public function getGroups(): array - { - } - public function getGroupDetails(): array - { - } - /** - * Set tests groups of the test case. - */ - public function setGroupDetails(array $groups): void - { - } - /** - * Runs the tests and collects their result in a TestResult. - * - * @throws \SebastianBergmann\CodeCoverage\InvalidArgumentException - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * @throws CodeCoverageException - * @throws \SebastianBergmann\CodeCoverage\UnintentionallyCoveredCodeException - * @throws Warning - */ - public function run(?\PHPUnit\Framework\TestResult $result = null): \PHPUnit\Framework\TestResult - { - } - public function setRunTestInSeparateProcess(bool $runTestInSeparateProcess): void - { - } - public function setName(string $name): void - { - } - /** - * Returns the tests as an enumeration. - * - * @return Test[] - */ - public function tests(): array - { - } - /** - * Set tests of the test suite. - * - * @param Test[] $tests - */ - public function setTests(array $tests): void - { - } - /** - * Mark the test suite as skipped. - * - * @param string $message - * - * @throws SkippedTestSuiteError - * - * @phan-return never-return - */ - public function markTestSuiteSkipped($message = ''): void - { - } - /** - * @param bool $beStrictAboutChangesToGlobalState - */ - public function setBeStrictAboutChangesToGlobalState($beStrictAboutChangesToGlobalState): void - { - } - /** - * @param bool $backupGlobals - */ - public function setBackupGlobals($backupGlobals): void - { - } - /** - * @param bool $backupStaticAttributes - */ - public function setBackupStaticAttributes($backupStaticAttributes): void - { - } - /** - * Returns an iterator for this test suite. - */ - public function getIterator(): \Iterator - { - } - public function injectFilter(\PHPUnit\Runner\Filter\Factory $filter): void - { - } - /** - * @phan-return array - */ - public function warnings(): array - { - } - /** - * @return list - */ - public function provides(): array - { - } - /** - * @return list - */ - public function requires(): array - { - } - public function sortId(): string - { - } - /** - * Creates a default TestResult object. - */ - protected function createResult(): \PHPUnit\Framework\TestResult - { - } - /** - * @throws Exception - */ - protected function addTestMethod(\ReflectionClass $class, \ReflectionMethod $method): void - { - } -} -/** - * Wraps Exceptions thrown by code under test. - * - * Re-instantiates Exceptions thrown by user-space code to retain their original - * class names, properties, and stack traces (but without arguments). - * - * Unlike PHPUnit\Framework\Exception, the complete stack of previous Exceptions - * is processed. - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final class ExceptionWrapper extends \PHPUnit\Framework\Exception -{ - public function __construct(\Throwable $t) - { - } - public function __toString(): string - { - } - public function getClassName(): string - { - } - public function getPreviousWrapped(): ?self - { - } - public function setClassName(string $className): void - { - } - public function setOriginalException(\Throwable $t): void - { - } - public function getOriginalException(): ?\Throwable + public static function resetCount(): void { } } @@ -5239,367 +3538,1851 @@ function assertXmlStringEqualsXmlString($expectedXml, $actualXml, string $messag function assertXmlStringNotEqualsXmlString($expectedXml, $actualXml, string $message = '', ...$func_get_args): void { } -/** - * Asserts that a hierarchy of DOMElements matches. - * - * @throws AssertionFailedError - * @throws ExpectationFailedException - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * - * @codeCoverageIgnore - * - * @deprecated https://github.com/sebastianbergmann/phpunit/issues/4091 - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @see Assert::assertEqualXMLStructure - */ -function assertEqualXMLStructure(\DOMElement $expectedElement, \DOMElement $actualElement, bool $checkAttributes = false, string $message = '', ...$func_get_args): void +/** + * Asserts that a hierarchy of DOMElements matches. + * + * @throws AssertionFailedError + * @throws ExpectationFailedException + * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * + * @codeCoverageIgnore + * + * @deprecated https://github.com/sebastianbergmann/phpunit/issues/4091 + * + * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit + * + * @see Assert::assertEqualXMLStructure + */ +function assertEqualXMLStructure(\DOMElement $expectedElement, \DOMElement $actualElement, bool $checkAttributes = false, string $message = '', ...$func_get_args): void +{ +} +/** + * Evaluates a PHPUnit\Framework\Constraint matcher object. + * + * @throws ExpectationFailedException + * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * + * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit + * + * @see Assert::assertThat + */ +function assertThat($value, \PHPUnit\Framework\Constraint\Constraint $constraint, string $message = '', ...$func_get_args): void +{ +} +/** + * Asserts that a string is a valid JSON string. + * + * @throws ExpectationFailedException + * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * + * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit + * + * @see Assert::assertJson + */ +function assertJson(string $actualJson, string $message = '', ...$func_get_args): void +{ +} +/** + * Asserts that two given JSON encoded objects or arrays are equal. + * + * @throws ExpectationFailedException + * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * + * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit + * + * @see Assert::assertJsonStringEqualsJsonString + */ +function assertJsonStringEqualsJsonString(string $expectedJson, string $actualJson, string $message = '', ...$func_get_args): void +{ +} +/** + * Asserts that two given JSON encoded objects or arrays are not equal. + * + * @param string $expectedJson + * @param string $actualJson + * + * @throws ExpectationFailedException + * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * + * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit + * + * @see Assert::assertJsonStringNotEqualsJsonString + */ +function assertJsonStringNotEqualsJsonString($expectedJson, $actualJson, string $message = '', ...$func_get_args): void +{ +} +/** + * Asserts that the generated JSON encoded object and the content of the given file are equal. + * + * @throws ExpectationFailedException + * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * + * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit + * + * @see Assert::assertJsonStringEqualsJsonFile + */ +function assertJsonStringEqualsJsonFile(string $expectedFile, string $actualJson, string $message = '', ...$func_get_args): void +{ +} +/** + * Asserts that the generated JSON encoded object and the content of the given file are not equal. + * + * @throws ExpectationFailedException + * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * + * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit + * + * @see Assert::assertJsonStringNotEqualsJsonFile + */ +function assertJsonStringNotEqualsJsonFile(string $expectedFile, string $actualJson, string $message = '', ...$func_get_args): void +{ +} +/** + * Asserts that two JSON files are equal. + * + * @throws ExpectationFailedException + * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * + * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit + * + * @see Assert::assertJsonFileEqualsJsonFile + */ +function assertJsonFileEqualsJsonFile(string $expectedFile, string $actualFile, string $message = '', ...$func_get_args): void +{ +} +/** + * Asserts that two JSON files are not equal. + * + * @throws ExpectationFailedException + * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * + * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit + * + * @see Assert::assertJsonFileNotEqualsJsonFile + */ +function assertJsonFileNotEqualsJsonFile(string $expectedFile, string $actualFile, string $message = '', ...$func_get_args): void +{ +} +function logicalAnd(...$func_get_args): \PHPUnit\Framework\Constraint\LogicalAnd +{ +} +function logicalOr(...$func_get_args): \PHPUnit\Framework\Constraint\LogicalOr +{ +} +function logicalNot(\PHPUnit\Framework\Constraint\Constraint $constraint, ...$func_get_args): \PHPUnit\Framework\Constraint\LogicalNot +{ +} +function logicalXor(...$func_get_args): \PHPUnit\Framework\Constraint\LogicalXor +{ +} +function anything(...$func_get_args): \PHPUnit\Framework\Constraint\IsAnything +{ +} +function isTrue(...$func_get_args): \PHPUnit\Framework\Constraint\IsTrue +{ +} +function callback(callable $callback, ...$func_get_args): \PHPUnit\Framework\Constraint\Callback +{ +} +function isFalse(...$func_get_args): \PHPUnit\Framework\Constraint\IsFalse +{ +} +function isJson(...$func_get_args): \PHPUnit\Framework\Constraint\IsJson +{ +} +function isNull(...$func_get_args): \PHPUnit\Framework\Constraint\IsNull +{ +} +function isFinite(...$func_get_args): \PHPUnit\Framework\Constraint\IsFinite +{ +} +function isInfinite(...$func_get_args): \PHPUnit\Framework\Constraint\IsInfinite +{ +} +function isNan(...$func_get_args): \PHPUnit\Framework\Constraint\IsNan +{ +} +function containsEqual($value, ...$func_get_args): \PHPUnit\Framework\Constraint\TraversableContainsEqual +{ +} +function containsIdentical($value, ...$func_get_args): \PHPUnit\Framework\Constraint\TraversableContainsIdentical +{ +} +function containsOnly(string $type, ...$func_get_args): \PHPUnit\Framework\Constraint\TraversableContainsOnly +{ +} +function containsOnlyInstancesOf(string $className, ...$func_get_args): \PHPUnit\Framework\Constraint\TraversableContainsOnly +{ +} +function arrayHasKey($key, ...$func_get_args): \PHPUnit\Framework\Constraint\ArrayHasKey +{ +} +function equalTo($value, ...$func_get_args): \PHPUnit\Framework\Constraint\IsEqual +{ +} +function equalToCanonicalizing($value, ...$func_get_args): \PHPUnit\Framework\Constraint\IsEqualCanonicalizing +{ +} +function equalToIgnoringCase($value, ...$func_get_args): \PHPUnit\Framework\Constraint\IsEqualIgnoringCase +{ +} +function equalToWithDelta($value, float $delta, ...$func_get_args): \PHPUnit\Framework\Constraint\IsEqualWithDelta +{ +} +function isEmpty(...$func_get_args): \PHPUnit\Framework\Constraint\IsEmpty +{ +} +function isWritable(...$func_get_args): \PHPUnit\Framework\Constraint\IsWritable +{ +} +function isReadable(...$func_get_args): \PHPUnit\Framework\Constraint\IsReadable +{ +} +function directoryExists(...$func_get_args): \PHPUnit\Framework\Constraint\DirectoryExists +{ +} +function fileExists(...$func_get_args): \PHPUnit\Framework\Constraint\FileExists +{ +} +function greaterThan($value, ...$func_get_args): \PHPUnit\Framework\Constraint\GreaterThan +{ +} +function greaterThanOrEqual($value, ...$func_get_args): \PHPUnit\Framework\Constraint\LogicalOr +{ +} +function classHasAttribute(string $attributeName, ...$func_get_args): \PHPUnit\Framework\Constraint\ClassHasAttribute +{ +} +function classHasStaticAttribute(string $attributeName, ...$func_get_args): \PHPUnit\Framework\Constraint\ClassHasStaticAttribute +{ +} +function objectHasAttribute($attributeName, ...$func_get_args): \PHPUnit\Framework\Constraint\ObjectHasAttribute +{ +} +function identicalTo($value, ...$func_get_args): \PHPUnit\Framework\Constraint\IsIdentical +{ +} +function isInstanceOf(string $className, ...$func_get_args): \PHPUnit\Framework\Constraint\IsInstanceOf +{ +} +function isType(string $type, ...$func_get_args): \PHPUnit\Framework\Constraint\IsType +{ +} +function lessThan($value, ...$func_get_args): \PHPUnit\Framework\Constraint\LessThan +{ +} +function lessThanOrEqual($value, ...$func_get_args): \PHPUnit\Framework\Constraint\LogicalOr +{ +} +function matchesRegularExpression(string $pattern, ...$func_get_args): \PHPUnit\Framework\Constraint\RegularExpression +{ +} +function matches(string $string, ...$func_get_args): \PHPUnit\Framework\Constraint\StringMatchesFormatDescription +{ +} +function stringStartsWith($prefix, ...$func_get_args): \PHPUnit\Framework\Constraint\StringStartsWith +{ +} +function stringContains(string $string, bool $case = true, ...$func_get_args): \PHPUnit\Framework\Constraint\StringContains +{ +} +function stringEndsWith(string $suffix, ...$func_get_args): \PHPUnit\Framework\Constraint\StringEndsWith { } -/** - * Evaluates a PHPUnit\Framework\Constraint matcher object. - * - * @throws ExpectationFailedException - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @see Assert::assertThat - */ -function assertThat($value, \PHPUnit\Framework\Constraint\Constraint $constraint, string $message = '', ...$func_get_args): void +function countOf(int $count, ...$func_get_args): \PHPUnit\Framework\Constraint\Count { } -/** - * Asserts that a string is a valid JSON string. - * - * @throws ExpectationFailedException - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @see Assert::assertJson - */ -function assertJson(string $actualJson, string $message = '', ...$func_get_args): void +function objectEquals(object $object, string $method = 'equals', ...$func_get_args): \PHPUnit\Framework\Constraint\ObjectEquals { } /** - * Asserts that two given JSON encoded objects or arrays are equal. - * - * @throws ExpectationFailedException - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @see Assert::assertJsonStringEqualsJsonString + * Returns a matcher that matches when the method is executed + * zero or more times. */ -function assertJsonStringEqualsJsonString(string $expectedJson, string $actualJson, string $message = '', ...$func_get_args): void +function any(): \PHPUnit\Framework\MockObject\Rule\AnyInvokedCount { } /** - * Asserts that two given JSON encoded objects or arrays are not equal. - * - * @param string $expectedJson - * @param string $actualJson - * - * @throws ExpectationFailedException - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @see Assert::assertJsonStringNotEqualsJsonString + * Returns a matcher that matches when the method is never executed. */ -function assertJsonStringNotEqualsJsonString($expectedJson, $actualJson, string $message = '', ...$func_get_args): void +function never(): \PHPUnit\Framework\MockObject\Rule\InvokedCount { } /** - * Asserts that the generated JSON encoded object and the content of the given file are equal. - * - * @throws ExpectationFailedException - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @see Assert::assertJsonStringEqualsJsonFile + * Returns a matcher that matches when the method is executed + * at least N times. */ -function assertJsonStringEqualsJsonFile(string $expectedFile, string $actualJson, string $message = '', ...$func_get_args): void +function atLeast(int $requiredInvocations): \PHPUnit\Framework\MockObject\Rule\InvokedAtLeastCount { } /** - * Asserts that the generated JSON encoded object and the content of the given file are not equal. - * - * @throws ExpectationFailedException - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @see Assert::assertJsonStringNotEqualsJsonFile + * Returns a matcher that matches when the method is executed at least once. */ -function assertJsonStringNotEqualsJsonFile(string $expectedFile, string $actualJson, string $message = '', ...$func_get_args): void +function atLeastOnce(): \PHPUnit\Framework\MockObject\Rule\InvokedAtLeastOnce { } /** - * Asserts that two JSON files are equal. - * - * @throws ExpectationFailedException - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @see Assert::assertJsonFileEqualsJsonFile + * Returns a matcher that matches when the method is executed exactly once. */ -function assertJsonFileEqualsJsonFile(string $expectedFile, string $actualFile, string $message = '', ...$func_get_args): void +function once(): \PHPUnit\Framework\MockObject\Rule\InvokedCount { } /** - * Asserts that two JSON files are not equal. - * - * @throws ExpectationFailedException - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @see Assert::assertJsonFileNotEqualsJsonFile + * Returns a matcher that matches when the method is executed + * exactly $count times. */ -function assertJsonFileNotEqualsJsonFile(string $expectedFile, string $actualFile, string $message = '', ...$func_get_args): void -{ -} -function logicalAnd(...$func_get_args): \PHPUnit\Framework\Constraint\LogicalAnd +function exactly(int $count): \PHPUnit\Framework\MockObject\Rule\InvokedCount { } -function logicalOr(...$func_get_args): \PHPUnit\Framework\Constraint\LogicalOr +/** + * Returns a matcher that matches when the method is executed + * at most N times. + */ +function atMost(int $allowedInvocations): \PHPUnit\Framework\MockObject\Rule\InvokedAtMostCount { } -function logicalNot(\PHPUnit\Framework\Constraint\Constraint $constraint, ...$func_get_args): \PHPUnit\Framework\Constraint\LogicalNot +/** + * Returns a matcher that matches when the method is executed + * at the given index. + */ +function at(int $index): \PHPUnit\Framework\MockObject\Rule\InvokedAtIndex { } -function logicalXor(...$func_get_args): \PHPUnit\Framework\Constraint\LogicalXor +function returnValue($value): \PHPUnit\Framework\MockObject\Stub\ReturnStub { } -function anything(...$func_get_args): \PHPUnit\Framework\Constraint\IsAnything +function returnValueMap(array $valueMap): \PHPUnit\Framework\MockObject\Stub\ReturnValueMap { } -function isTrue(...$func_get_args): \PHPUnit\Framework\Constraint\IsTrue +function returnArgument(int $argumentIndex): \PHPUnit\Framework\MockObject\Stub\ReturnArgument { } -function callback(callable $callback, ...$func_get_args): \PHPUnit\Framework\Constraint\Callback +function returnCallback($callback): \PHPUnit\Framework\MockObject\Stub\ReturnCallback { } -function isFalse(...$func_get_args): \PHPUnit\Framework\Constraint\IsFalse +/** + * Returns the current object. + * + * This method is useful when mocking a fluent interface. + */ +function returnSelf(): \PHPUnit\Framework\MockObject\Stub\ReturnSelf { } -function isJson(...$func_get_args): \PHPUnit\Framework\Constraint\IsJson +function throwException(\Throwable $exception): \PHPUnit\Framework\MockObject\Stub\Exception { } -function isNull(...$func_get_args): \PHPUnit\Framework\Constraint\IsNull +function onConsecutiveCalls(...$func_get_args): \PHPUnit\Framework\MockObject\Stub\ConsecutiveCalls { } -function isFinite(...$func_get_args): \PHPUnit\Framework\Constraint\IsFinite +/** + * @internal This class is not covered by the backward compatibility promise for PHPUnit + */ +final class DataProviderTestSuite extends \PHPUnit\Framework\TestSuite { + /** + * @param list $dependencies + */ + public function setDependencies(array $dependencies): void + { + } + /** + * @return list + */ + public function provides(): array + { + } + /** + * @return list + */ + public function requires(): array + { + } + /** + * Returns the size of the each test created using the data provider(s). + * + * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + */ + public function getSize(): int + { + } } -function isInfinite(...$func_get_args): \PHPUnit\Framework\Constraint\IsInfinite +/** + * @internal This class is not covered by the backward compatibility promise for PHPUnit + */ +final class ErrorTestCase extends \PHPUnit\Framework\TestCase { + public function __construct(string $message = '') + { + } + public function getMessage(): string + { + } + /** + * Returns a string representation of the test case. + */ + public function toString(): string + { + } } -function isNan(...$func_get_args): \PHPUnit\Framework\Constraint\IsNan +/** + * @internal This class is not covered by the backward compatibility promise for PHPUnit + */ +final class ActualValueIsNotAnObjectException extends \PHPUnit\Framework\Exception { + public function __construct() + { + } + public function __toString(): string + { + } } -function containsEqual($value, ...$func_get_args): \PHPUnit\Framework\Constraint\TraversableContainsEqual +/** + * @internal This class is not covered by the backward compatibility promise for PHPUnit + */ +class AssertionFailedError extends \PHPUnit\Framework\Exception implements \PHPUnit\Framework\SelfDescribing { + /** + * Wrapper for getMessage() which is declared as final. + */ + public function toString(): string + { + } } -function containsIdentical($value, ...$func_get_args): \PHPUnit\Framework\Constraint\TraversableContainsIdentical +/** + * @internal This class is not covered by the backward compatibility promise for PHPUnit + */ +class CodeCoverageException extends \PHPUnit\Framework\Exception { } -function containsOnly(string $type, ...$func_get_args): \PHPUnit\Framework\Constraint\TraversableContainsOnly +/** + * @internal This class is not covered by the backward compatibility promise for PHPUnit + */ +final class ComparisonMethodDoesNotAcceptParameterTypeException extends \PHPUnit\Framework\Exception { + public function __construct(string $className, string $methodName, string $type) + { + } + public function __toString(): string + { + } } -function containsOnlyInstancesOf(string $className, ...$func_get_args): \PHPUnit\Framework\Constraint\TraversableContainsOnly +/** + * @internal This class is not covered by the backward compatibility promise for PHPUnit + */ +final class ComparisonMethodDoesNotDeclareBoolReturnTypeException extends \PHPUnit\Framework\Exception { + public function __construct(string $className, string $methodName) + { + } + public function __toString(): string + { + } } -function arrayHasKey($key, ...$func_get_args): \PHPUnit\Framework\Constraint\ArrayHasKey +/** + * @internal This class is not covered by the backward compatibility promise for PHPUnit + */ +final class ComparisonMethodDoesNotDeclareExactlyOneParameterException extends \PHPUnit\Framework\Exception { + public function __construct(string $className, string $methodName) + { + } + public function __toString(): string + { + } } -function equalTo($value, ...$func_get_args): \PHPUnit\Framework\Constraint\IsEqual +/** + * @internal This class is not covered by the backward compatibility promise for PHPUnit + */ +final class ComparisonMethodDoesNotDeclareParameterTypeException extends \PHPUnit\Framework\Exception { + public function __construct(string $className, string $methodName) + { + } + public function __toString(): string + { + } } -function equalToCanonicalizing($value, ...$func_get_args): \PHPUnit\Framework\Constraint\IsEqualCanonicalizing +/** + * @internal This class is not covered by the backward compatibility promise for PHPUnit + */ +final class ComparisonMethodDoesNotExistException extends \PHPUnit\Framework\Exception { + public function __construct(string $className, string $methodName) + { + } + public function __toString(): string + { + } } -function equalToIgnoringCase($value, ...$func_get_args): \PHPUnit\Framework\Constraint\IsEqualIgnoringCase +/** + * @internal This class is not covered by the backward compatibility promise for PHPUnit + */ +final class CoveredCodeNotExecutedException extends \PHPUnit\Framework\RiskyTestError { } -function equalToWithDelta($value, float $delta, ...$func_get_args): \PHPUnit\Framework\Constraint\IsEqualWithDelta +/** + * @internal This class is not covered by the backward compatibility promise for PHPUnit + */ +final class Error extends \PHPUnit\Framework\Exception implements \PHPUnit\Framework\SelfDescribing { + /** + * Wrapper for getMessage() which is declared as final. + */ + public function toString(): string + { + } } -function isEmpty(...$func_get_args): \PHPUnit\Framework\Constraint\IsEmpty +/** + * Base class for all PHPUnit Framework exceptions. + * + * Ensures that exceptions thrown during a test run do not leave stray + * references behind. + * + * Every Exception contains a stack trace. Each stack frame contains the 'args' + * of the called function. The function arguments can contain references to + * instantiated objects. The references prevent the objects from being + * destructed (until test results are eventually printed), so memory cannot be + * freed up. + * + * With enabled process isolation, test results are serialized in the child + * process and unserialized in the parent process. The stack trace of Exceptions + * may contain objects that cannot be serialized or unserialized (e.g., PDO + * connections). Unserializing user-space objects from the child process into + * the parent would break the intended encapsulation of process isolation. + * + * @see http://fabien.potencier.org/article/9/php-serialization-stack-traces-and-exceptions + * + * @internal This class is not covered by the backward compatibility promise for PHPUnit + */ +class Exception extends \RuntimeException implements \PHPUnit\Exception { + /** + * @var array + */ + protected $serializableTrace; + public function __construct($message = '', $code = 0, ?\Throwable $previous = null) + { + } + public function __toString(): string + { + } + public function __sleep(): array + { + } + /** + * Returns the serializable trace (without 'args'). + */ + public function getSerializableTrace(): array + { + } } -function isWritable(...$func_get_args): \PHPUnit\Framework\Constraint\IsWritable +/** + * Exception for expectations which failed their check. + * + * The exception contains the error message and optionally a + * SebastianBergmann\Comparator\ComparisonFailure which is used to + * generate diff output of the failed expectations. + * + * @internal This class is not covered by the backward compatibility promise for PHPUnit + */ +final class ExpectationFailedException extends \PHPUnit\Framework\AssertionFailedError { + public function __construct(string $message, ?\SebastianBergmann\Comparator\ComparisonFailure $comparisonFailure = null, ?\Exception $previous = null) + { + } + public function getComparisonFailure(): ?\SebastianBergmann\Comparator\ComparisonFailure + { + } } -function isReadable(...$func_get_args): \PHPUnit\Framework\Constraint\IsReadable +/** + * @internal This class is not covered by the backward compatibility promise for PHPUnit + */ +final class IncompleteTestError extends \PHPUnit\Framework\AssertionFailedError implements \PHPUnit\Framework\IncompleteTest { } -function directoryExists(...$func_get_args): \PHPUnit\Framework\Constraint\DirectoryExists +/** + * @internal This class is not covered by the backward compatibility promise for PHPUnit + */ +final class InvalidArgumentException extends \PHPUnit\Framework\Exception { + public static function create(int $argument, string $type): self + { + } } -function fileExists(...$func_get_args): \PHPUnit\Framework\Constraint\FileExists +/** + * @internal This class is not covered by the backward compatibility promise for PHPUnit + */ +final class InvalidCoversTargetException extends \PHPUnit\Framework\CodeCoverageException { } -function greaterThan($value, ...$func_get_args): \PHPUnit\Framework\Constraint\GreaterThan +/** + * @internal This class is not covered by the backward compatibility promise for PHPUnit + */ +final class InvalidDataProviderException extends \PHPUnit\Framework\Exception { } -function greaterThanOrEqual($value, ...$func_get_args): \PHPUnit\Framework\Constraint\LogicalOr +/** + * @internal This class is not covered by the backward compatibility promise for PHPUnit + */ +final class MissingCoversAnnotationException extends \PHPUnit\Framework\RiskyTestError { } -function classHasAttribute(string $attributeName, ...$func_get_args): \PHPUnit\Framework\Constraint\ClassHasAttribute +/** + * @internal This class is not covered by the backward compatibility promise for PHPUnit + */ +final class NoChildTestSuiteException extends \PHPUnit\Framework\Exception { } -function classHasStaticAttribute(string $attributeName, ...$func_get_args): \PHPUnit\Framework\Constraint\ClassHasStaticAttribute +/** + * @internal This class is not covered by the backward compatibility promise for PHPUnit + */ +final class OutputError extends \PHPUnit\Framework\AssertionFailedError { } -function objectHasAttribute($attributeName, ...$func_get_args): \PHPUnit\Framework\Constraint\ObjectHasAttribute +/** + * @internal This class is not covered by the backward compatibility promise for PHPUnit + */ +final class PHPTAssertionFailedError extends \PHPUnit\Framework\SyntheticError { + public function __construct(string $message, int $code, string $file, int $line, array $trace, string $diff) + { + } + public function getDiff(): string + { + } } -function identicalTo($value, ...$func_get_args): \PHPUnit\Framework\Constraint\IsIdentical +/** + * @internal This class is not covered by the backward compatibility promise for PHPUnit + */ +class RiskyTestError extends \PHPUnit\Framework\AssertionFailedError { } -function isInstanceOf(string $className, ...$func_get_args): \PHPUnit\Framework\Constraint\IsInstanceOf +/** + * @internal This class is not covered by the backward compatibility promise for PHPUnit + */ +final class SkippedTestError extends \PHPUnit\Framework\AssertionFailedError implements \PHPUnit\Framework\SkippedTest { } -function isType(string $type, ...$func_get_args): \PHPUnit\Framework\Constraint\IsType +/** + * @internal This class is not covered by the backward compatibility promise for PHPUnit + */ +final class SkippedTestSuiteError extends \PHPUnit\Framework\AssertionFailedError implements \PHPUnit\Framework\SkippedTest { } -function lessThan($value, ...$func_get_args): \PHPUnit\Framework\Constraint\LessThan +/** + * @internal This class is not covered by the backward compatibility promise for PHPUnit + */ +class SyntheticError extends \PHPUnit\Framework\AssertionFailedError { + /** + * The synthetic file. + * + * @var string + */ + protected $syntheticFile = ''; + /** + * The synthetic line number. + * + * @var int + */ + protected $syntheticLine = 0; + /** + * The synthetic trace. + * + * @var array + */ + protected $syntheticTrace = []; + public function __construct(string $message, int $code, string $file, int $line, array $trace) + { + } + public function getSyntheticFile(): string + { + } + public function getSyntheticLine(): int + { + } + public function getSyntheticTrace(): array + { + } } -function lessThanOrEqual($value, ...$func_get_args): \PHPUnit\Framework\Constraint\LogicalOr +/** + * @internal This class is not covered by the backward compatibility promise for PHPUnit + */ +final class SyntheticSkippedError extends \PHPUnit\Framework\SyntheticError implements \PHPUnit\Framework\SkippedTest { } -function matchesRegularExpression(string $pattern, ...$func_get_args): \PHPUnit\Framework\Constraint\RegularExpression +/** + * @internal This class is not covered by the backward compatibility promise for PHPUnit + */ +final class UnintentionallyCoveredCodeError extends \PHPUnit\Framework\RiskyTestError { } -function matches(string $string, ...$func_get_args): \PHPUnit\Framework\Constraint\StringMatchesFormatDescription +/** + * @internal This class is not covered by the backward compatibility promise for PHPUnit + */ +final class Warning extends \PHPUnit\Framework\Exception implements \PHPUnit\Framework\SelfDescribing { + /** + * Wrapper for getMessage() which is declared as final. + */ + public function toString(): string + { + } } -function stringStartsWith($prefix, ...$func_get_args): \PHPUnit\Framework\Constraint\StringStartsWith +/** + * Wraps Exceptions thrown by code under test. + * + * Re-instantiates Exceptions thrown by user-space code to retain their original + * class names, properties, and stack traces (but without arguments). + * + * Unlike PHPUnit\Framework\Exception, the complete stack of previous Exceptions + * is processed. + * + * @internal This class is not covered by the backward compatibility promise for PHPUnit + */ +final class ExceptionWrapper extends \PHPUnit\Framework\Exception { + public function __construct(\Throwable $t) + { + } + public function __toString(): string + { + } + public function getClassName(): string + { + } + public function getPreviousWrapped(): ?self + { + } + public function setClassName(string $className): void + { + } + public function setOriginalException(\Throwable $t): void + { + } + public function getOriginalException(): ?\Throwable + { + } } -function stringContains(string $string, bool $case = true, ...$func_get_args): \PHPUnit\Framework\Constraint\StringContains +/** + * @internal This class is not covered by the backward compatibility promise for PHPUnit + */ +final class ExecutionOrderDependency { + public static function createFromDependsAnnotation(string $className, string $annotation): self + { + } + /** + * @phan-param list $dependencies + * + * @phan-return list + */ + public static function filterInvalid(array $dependencies): array + { + } + /** + * @phan-param list $existing + * @phan-param list $additional + * + * @phan-return list + */ + public static function mergeUnique(array $existing, array $additional): array + { + } + /** + * @phan-param list $left + * @phan-param list $right + * + * @phan-return list + */ + public static function diff(array $left, array $right): array + { + } + public function __construct(string $classOrCallableName, ?string $methodName = null, ?string $option = null) + { + } + public function __toString(): string + { + } + public function isValid(): bool + { + } + public function useShallowClone(): bool + { + } + public function useDeepClone(): bool + { + } + public function targetIsClass(): bool + { + } + public function getTarget(): string + { + } + public function getTargetClassName(): string + { + } } -function stringEndsWith(string $suffix, ...$func_get_args): \PHPUnit\Framework\Constraint\StringEndsWith +/** + * @internal This class is not covered by the backward compatibility promise for PHPUnit + */ +interface IncompleteTest extends \Throwable { } -function countOf(int $count, ...$func_get_args): \PHPUnit\Framework\Constraint\Count +/** + * @internal This class is not covered by the backward compatibility promise for PHPUnit + */ +final class IncompleteTestCase extends \PHPUnit\Framework\TestCase { + public function __construct(string $className, string $methodName, string $message = '') + { + } + public function getMessage(): string + { + } + /** + * Returns a string representation of the test case. + * + * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + */ + public function toString(): string + { + } } -function objectEquals(object $object, string $method = 'equals', ...$func_get_args): \PHPUnit\Framework\Constraint\ObjectEquals +/** + * @internal This class is not covered by the backward compatibility promise for PHPUnit + */ +final class InvalidParameterGroupException extends \PHPUnit\Framework\Exception { } /** - * Returns a matcher that matches when the method is executed - * zero or more times. + * @internal This class is not covered by the backward compatibility promise for PHPUnit */ -function any(): \PHPUnit\Framework\MockObject\Rule\AnyInvokedCount +interface Reorderable { + public function sortId(): string; + /** + * @return list + */ + public function provides(): array; + /** + * @return list + */ + public function requires(): array; } /** - * Returns a matcher that matches when the method is never executed. + * @internal This class is not covered by the backward compatibility promise for PHPUnit */ -function never(): \PHPUnit\Framework\MockObject\Rule\InvokedCount +interface SelfDescribing { + /** + * Returns a string representation of the object. + */ + public function toString(): string; } /** - * Returns a matcher that matches when the method is executed - * at least N times. + * @internal This class is not covered by the backward compatibility promise for PHPUnit */ -function atLeast(int $requiredInvocations): \PHPUnit\Framework\MockObject\Rule\InvokedAtLeastCount +interface SkippedTest extends \Throwable { } /** - * Returns a matcher that matches when the method is executed at least once. + * @internal This class is not covered by the backward compatibility promise for PHPUnit */ -function atLeastOnce(): \PHPUnit\Framework\MockObject\Rule\InvokedAtLeastOnce +final class SkippedTestCase extends \PHPUnit\Framework\TestCase { + public function __construct(string $className, string $methodName, string $message = '') + { + } + public function getMessage(): string + { + } + /** + * Returns a string representation of the test case. + * + * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + */ + public function toString(): string + { + } } /** - * Returns a matcher that matches when the method is executed exactly once. + * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit */ -function once(): \PHPUnit\Framework\MockObject\Rule\InvokedCount +interface Test extends \Countable { + /** + * Runs a test and collects its result in a TestResult instance. + */ + public function run(?\PHPUnit\Framework\TestResult $result = null): \PHPUnit\Framework\TestResult; } /** - * Returns a matcher that matches when the method is executed - * exactly $count times. + * @internal This class is not covered by the backward compatibility promise for PHPUnit */ -function exactly(int $count): \PHPUnit\Framework\MockObject\Rule\InvokedCount +final class TestBuilder { + public function build(\ReflectionClass $theClass, string $methodName): \PHPUnit\Framework\Test + { + } } /** - * Returns a matcher that matches when the method is executed - * at most N times. + * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit */ -function atMost(int $allowedInvocations): \PHPUnit\Framework\MockObject\Rule\InvokedAtMostCount +abstract class TestCase extends \PHPUnit\Framework\Assert implements \PHPUnit\Framework\Reorderable, \PHPUnit\Framework\SelfDescribing, \PHPUnit\Framework\Test { + /** + * @var ?bool + */ + protected $backupGlobals; + /** + * @var string[] + */ + protected $backupGlobalsExcludeList = []; + /** + * @var string[] + * + * @deprecated Use $backupGlobalsExcludeList instead + */ + protected $backupGlobalsBlacklist = []; + /** + * @var ?bool + */ + protected $backupStaticAttributes; + /** + * @var array> + */ + protected $backupStaticAttributesExcludeList = []; + /** + * @var array> + * + * @deprecated Use $backupStaticAttributesExcludeList instead + */ + protected $backupStaticAttributesBlacklist = []; + /** + * @var ?bool + */ + protected $runTestInSeparateProcess; + /** + * @var bool + */ + protected $preserveGlobalState = true; + /** + * @var list + */ + protected $providedTests = []; + /** + * Returns a matcher that matches when the method is executed + * zero or more times. + */ + public static function any(): \PHPUnit\Framework\MockObject\Rule\AnyInvokedCount + { + } + /** + * Returns a matcher that matches when the method is never executed. + */ + public static function never(): \PHPUnit\Framework\MockObject\Rule\InvokedCount + { + } + /** + * Returns a matcher that matches when the method is executed + * at least N times. + */ + public static function atLeast(int $requiredInvocations): \PHPUnit\Framework\MockObject\Rule\InvokedAtLeastCount + { + } + /** + * Returns a matcher that matches when the method is executed at least once. + */ + public static function atLeastOnce(): \PHPUnit\Framework\MockObject\Rule\InvokedAtLeastOnce + { + } + /** + * Returns a matcher that matches when the method is executed exactly once. + */ + public static function once(): \PHPUnit\Framework\MockObject\Rule\InvokedCount + { + } + /** + * Returns a matcher that matches when the method is executed + * exactly $count times. + */ + public static function exactly(int $count): \PHPUnit\Framework\MockObject\Rule\InvokedCount + { + } + /** + * Returns a matcher that matches when the method is executed + * at most N times. + */ + public static function atMost(int $allowedInvocations): \PHPUnit\Framework\MockObject\Rule\InvokedAtMostCount + { + } + /** + * Returns a matcher that matches when the method is executed + * at the given index. + * + * @deprecated https://github.com/sebastianbergmann/phpunit/issues/4297 + * + * @codeCoverageIgnore + */ + public static function at(int $index): \PHPUnit\Framework\MockObject\Rule\InvokedAtIndex + { + } + public static function returnValue($value): \PHPUnit\Framework\MockObject\Stub\ReturnStub + { + } + public static function returnValueMap(array $valueMap): \PHPUnit\Framework\MockObject\Stub\ReturnValueMap + { + } + public static function returnArgument(int $argumentIndex): \PHPUnit\Framework\MockObject\Stub\ReturnArgument + { + } + public static function returnCallback($callback): \PHPUnit\Framework\MockObject\Stub\ReturnCallback + { + } + /** + * Returns the current object. + * + * This method is useful when mocking a fluent interface. + */ + public static function returnSelf(): \PHPUnit\Framework\MockObject\Stub\ReturnSelf + { + } + public static function throwException(\Throwable $exception): \PHPUnit\Framework\MockObject\Stub\Exception + { + } + public static function onConsecutiveCalls(...$args): \PHPUnit\Framework\MockObject\Stub\ConsecutiveCalls + { + } + /** + * @param int|string $dataName + * + * @internal This method is not covered by the backward compatibility promise for PHPUnit + */ + public function __construct(?string $name = null, array $data = [], $dataName = '') + { + } + /** + * This method is called before the first test of this test class is run. + */ + public static function setUpBeforeClass(): void + { + } + /** + * This method is called after the last test of this test class is run. + */ + public static function tearDownAfterClass(): void + { + } + /** + * This method is called before each test. + */ + protected function setUp(): void + { + } + /** + * Performs assertions shared by all tests of a test case. + * + * This method is called between setUp() and test. + */ + protected function assertPreConditions(): void + { + } + /** + * Performs assertions shared by all tests of a test case. + * + * This method is called between test and tearDown(). + */ + protected function assertPostConditions(): void + { + } + /** + * This method is called after each test. + */ + protected function tearDown(): void + { + } + /** + * Returns a string representation of the test case. + * + * @throws Exception + * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + */ + public function toString(): string + { + } + public function count(): int + { + } + public function getActualOutputForAssertion(): string + { + } + public function expectOutputRegex(string $expectedRegex): void + { + } + public function expectOutputString(string $expectedString): void + { + } + /** + * @phan-param class-string<\Throwable> $exception + */ + public function expectException(string $exception): void + { + } + /** + * @param int|string $code + */ + public function expectExceptionCode($code): void + { + } + public function expectExceptionMessage(string $message): void + { + } + public function expectExceptionMessageMatches(string $regularExpression): void + { + } + /** + * Sets up an expectation for an exception to be raised by the code under test. + * Information for expected exception class, expected exception message, and + * expected exception code are retrieved from a given Exception object. + */ + public function expectExceptionObject(\Exception $exception): void + { + } + public function expectNotToPerformAssertions(): void + { + } + /** + * @deprecated https://github.com/sebastianbergmann/phpunit/issues/5062 + */ + public function expectDeprecation(): void + { + } + /** + * @deprecated https://github.com/sebastianbergmann/phpunit/issues/5062 + */ + public function expectDeprecationMessage(string $message): void + { + } + /** + * @deprecated https://github.com/sebastianbergmann/phpunit/issues/5062 + */ + public function expectDeprecationMessageMatches(string $regularExpression): void + { + } + /** + * @deprecated https://github.com/sebastianbergmann/phpunit/issues/5062 + */ + public function expectNotice(): void + { + } + /** + * @deprecated https://github.com/sebastianbergmann/phpunit/issues/5062 + */ + public function expectNoticeMessage(string $message): void + { + } + /** + * @deprecated https://github.com/sebastianbergmann/phpunit/issues/5062 + */ + public function expectNoticeMessageMatches(string $regularExpression): void + { + } + /** + * @deprecated https://github.com/sebastianbergmann/phpunit/issues/5062 + */ + public function expectWarning(): void + { + } + /** + * @deprecated https://github.com/sebastianbergmann/phpunit/issues/5062 + */ + public function expectWarningMessage(string $message): void + { + } + /** + * @deprecated https://github.com/sebastianbergmann/phpunit/issues/5062 + */ + public function expectWarningMessageMatches(string $regularExpression): void + { + } + /** + * @deprecated https://github.com/sebastianbergmann/phpunit/issues/5062 + */ + public function expectError(): void + { + } + /** + * @deprecated https://github.com/sebastianbergmann/phpunit/issues/5062 + */ + public function expectErrorMessage(string $message): void + { + } + /** + * @deprecated https://github.com/sebastianbergmann/phpunit/issues/5062 + */ + public function expectErrorMessageMatches(string $regularExpression): void + { + } + public function getStatus(): int + { + } + public function markAsRisky(): void + { + } + public function getStatusMessage(): string + { + } + public function hasFailed(): bool + { + } + /** + * Runs the test case and collects the results in a TestResult object. + * If no TestResult object is passed a new one will be created. + * + * @throws \SebastianBergmann\CodeCoverage\InvalidArgumentException + * @throws CodeCoverageException + * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * @throws \SebastianBergmann\CodeCoverage\UnintentionallyCoveredCodeException + * @throws \PHPUnit\Util\Exception + */ + public function run(?\PHPUnit\Framework\TestResult $result = null): \PHPUnit\Framework\TestResult + { + } + /** + * Returns a builder object to create mock objects using a fluent interface. + * + * @phan-template RealInstanceType of object + * + * @phan-param class-string $className + * + * @phan-return MockObject\MockBuilder + */ + public function getMockBuilder(string $className): \PHPUnit\Framework\MockObject\MockBuilder + { + } + public function registerComparator(\SebastianBergmann\Comparator\Comparator $comparator): void + { + } + /** + * @return string[] + * + * @internal This method is not covered by the backward compatibility promise for PHPUnit + */ + public function doubledTypes(): array + { + } + /** + * @internal This method is not covered by the backward compatibility promise for PHPUnit + */ + public function getGroups(): array + { + } + /** + * @internal This method is not covered by the backward compatibility promise for PHPUnit + */ + public function setGroups(array $groups): void + { + } + /** + * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * + * @internal This method is not covered by the backward compatibility promise for PHPUnit + */ + public function getName(bool $withDataSet = true): string + { + } + /** + * Returns the size of the test. + * + * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * + * @internal This method is not covered by the backward compatibility promise for PHPUnit + */ + public function getSize(): int + { + } + /** + * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * + * @internal This method is not covered by the backward compatibility promise for PHPUnit + */ + public function hasSize(): bool + { + } + /** + * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * + * @internal This method is not covered by the backward compatibility promise for PHPUnit + */ + public function isSmall(): bool + { + } + /** + * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * + * @internal This method is not covered by the backward compatibility promise for PHPUnit + */ + public function isMedium(): bool + { + } + /** + * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * + * @internal This method is not covered by the backward compatibility promise for PHPUnit + */ + public function isLarge(): bool + { + } + /** + * @internal This method is not covered by the backward compatibility promise for PHPUnit + */ + public function getActualOutput(): string + { + } + /** + * @internal This method is not covered by the backward compatibility promise for PHPUnit + */ + public function hasOutput(): bool + { + } + /** + * @internal This method is not covered by the backward compatibility promise for PHPUnit + */ + public function doesNotPerformAssertions(): bool + { + } + /** + * @internal This method is not covered by the backward compatibility promise for PHPUnit + */ + public function hasExpectationOnOutput(): bool + { + } + /** + * @internal This method is not covered by the backward compatibility promise for PHPUnit + */ + public function getExpectedException(): ?string + { + } + /** + * @return null|int|string + * + * @internal This method is not covered by the backward compatibility promise for PHPUnit + */ + public function getExpectedExceptionCode() + { + } + /** + * @internal This method is not covered by the backward compatibility promise for PHPUnit + */ + public function getExpectedExceptionMessage(): ?string + { + } + /** + * @internal This method is not covered by the backward compatibility promise for PHPUnit + */ + public function getExpectedExceptionMessageRegExp(): ?string + { + } + /** + * @internal This method is not covered by the backward compatibility promise for PHPUnit + */ + public function setRegisterMockObjectsFromTestArgumentsRecursively(bool $flag): void + { + } + /** + * @throws \Throwable + * + * @internal This method is not covered by the backward compatibility promise for PHPUnit + */ + public function runBare(): void + { + } + /** + * @internal This method is not covered by the backward compatibility promise for PHPUnit + */ + public function setName(string $name): void + { + } + /** + * @param list $dependencies + * + * @internal This method is not covered by the backward compatibility promise for PHPUnit + */ + public function setDependencies(array $dependencies): void + { + } + /** + * @internal This method is not covered by the backward compatibility promise for PHPUnit + */ + public function setDependencyInput(array $dependencyInput): void + { + } + /** + * @internal This method is not covered by the backward compatibility promise for PHPUnit + */ + public function setBeStrictAboutChangesToGlobalState(?bool $beStrictAboutChangesToGlobalState): void + { + } + /** + * @internal This method is not covered by the backward compatibility promise for PHPUnit + */ + public function setBackupGlobals(?bool $backupGlobals): void + { + } + /** + * @internal This method is not covered by the backward compatibility promise for PHPUnit + */ + public function setBackupStaticAttributes(?bool $backupStaticAttributes): void + { + } + /** + * @internal This method is not covered by the backward compatibility promise for PHPUnit + */ + public function setRunTestInSeparateProcess(bool $runTestInSeparateProcess): void + { + } + /** + * @internal This method is not covered by the backward compatibility promise for PHPUnit + */ + public function setRunClassInSeparateProcess(bool $runClassInSeparateProcess): void + { + } + /** + * @internal This method is not covered by the backward compatibility promise for PHPUnit + */ + public function setPreserveGlobalState(bool $preserveGlobalState): void + { + } + /** + * @internal This method is not covered by the backward compatibility promise for PHPUnit + */ + public function setInIsolation(bool $inIsolation): void + { + } + /** + * @internal This method is not covered by the backward compatibility promise for PHPUnit + */ + public function isInIsolation(): bool + { + } + /** + * @internal This method is not covered by the backward compatibility promise for PHPUnit + */ + public function getResult() + { + } + /** + * @internal This method is not covered by the backward compatibility promise for PHPUnit + */ + public function setResult($result): void + { + } + /** + * @internal This method is not covered by the backward compatibility promise for PHPUnit + */ + public function setOutputCallback(callable $callback): void + { + } + /** + * @internal This method is not covered by the backward compatibility promise for PHPUnit + */ + public function getTestResultObject(): ?\PHPUnit\Framework\TestResult + { + } + /** + * @internal This method is not covered by the backward compatibility promise for PHPUnit + */ + public function setTestResultObject(\PHPUnit\Framework\TestResult $result): void + { + } + /** + * @internal This method is not covered by the backward compatibility promise for PHPUnit + */ + public function registerMockObject(\PHPUnit\Framework\MockObject\MockObject $mockObject): void + { + } + /** + * @internal This method is not covered by the backward compatibility promise for PHPUnit + */ + public function addToAssertionCount(int $count): void + { + } + /** + * Returns the number of assertions performed by this test. + * + * @internal This method is not covered by the backward compatibility promise for PHPUnit + */ + public function getNumAssertions(): int + { + } + /** + * @internal This method is not covered by the backward compatibility promise for PHPUnit + */ + public function usesDataProvider(): bool + { + } + /** + * @return int|string + * + * @internal This method is not covered by the backward compatibility promise for PHPUnit + */ + public function dataName() + { + } + /** + * @internal This method is not covered by the backward compatibility promise for PHPUnit + */ + public function getDataSetAsString(bool $includeData = true): string + { + } + /** + * Gets the data set of a TestCase. + * + * @internal This method is not covered by the backward compatibility promise for PHPUnit + */ + public function getProvidedData(): array + { + } + /** + * @internal This method is not covered by the backward compatibility promise for PHPUnit + */ + public function addWarning(string $warning): void + { + } + public function sortId(): string + { + } + /** + * Returns the normalized test name as class::method. + * + * @return list + */ + public function provides(): array + { + } + /** + * Returns a list of normalized dependency names, class::method. + * + * This list can differ from the raw dependencies as the resolver has + * no need for the [!][shallow]clone prefix that is filtered out + * during normalization. + * + * @return list + */ + public function requires(): array + { + } + /** + * Override to run the test and assert its state. + * + * @throws \SebastianBergmann\ObjectEnumerator\InvalidArgumentException + * @throws AssertionFailedError + * @throws Exception + * @throws ExpectationFailedException + * @throws \Throwable + */ + protected function runTest() + { + } + /** + * This method is a wrapper for the ini_set() function that automatically + * resets the modified php.ini setting to its original value after the + * test is run. + * + * @throws Exception + */ + protected function iniSet(string $varName, string $newValue): void + { + } + /** + * This method is a wrapper for the setlocale() function that automatically + * resets the locale to its original value after the test is run. + * + * @throws Exception + */ + protected function setLocale(...$args): void + { + } + /** + * Makes configurable stub for the specified class. + * + * @phan-template RealInstanceType of object + * + * @phan-param class-string $originalClassName + * + * @phan-return MockObject\Stub&RealInstanceType + */ + protected function createStub(string $originalClassName): \PHPUnit\Framework\MockObject\Stub + { + } + /** + * Returns a mock object for the specified class. + * + * @phan-template RealInstanceType of object + * + * @phan-param class-string $originalClassName + * + * @phan-return MockObject\MockObject&RealInstanceType + */ + protected function createMock(string $originalClassName): \PHPUnit\Framework\MockObject\MockObject + { + } + /** + * Returns a configured mock object for the specified class. + * + * @phan-template RealInstanceType of object + * + * @phan-param class-string $originalClassName + * + * @phan-return MockObject\MockObject&RealInstanceType + */ + protected function createConfiguredMock(string $originalClassName, array $configuration): \PHPUnit\Framework\MockObject\MockObject + { + } + /** + * Returns a partial mock object for the specified class. + * + * @param string[] $methods + * + * @phan-template RealInstanceType of object + * + * @phan-param class-string $originalClassName + * + * @phan-return MockObject\MockObject&RealInstanceType + */ + protected function createPartialMock(string $originalClassName, array $methods): \PHPUnit\Framework\MockObject\MockObject + { + } + /** + * Returns a test proxy for the specified class. + * + * @phan-template RealInstanceType of object + * + * @phan-param class-string $originalClassName + * + * @phan-return MockObject\MockObject&RealInstanceType + */ + protected function createTestProxy(string $originalClassName, array $constructorArguments = []): \PHPUnit\Framework\MockObject\MockObject + { + } + /** + * Mocks the specified class and returns the name of the mocked class. + * + * @param null|array $methods $methods + * + * @phan-template RealInstanceType of object + * + * @phan-param class-string|string $originalClassName + * + * @phan-return class-string + * + * @deprecated + */ + protected function getMockClass(string $originalClassName, $methods = [], array $arguments = [], string $mockClassName = '', bool $callOriginalConstructor = false, bool $callOriginalClone = true, bool $callAutoload = true, bool $cloneArguments = false): string + { + } + /** + * Returns a mock object for the specified abstract class with all abstract + * methods of the class mocked. Concrete methods are not mocked by default. + * To mock concrete methods, use the 7th parameter ($mockedMethods). + * + * @phan-template RealInstanceType of object + * + * @phan-param class-string $originalClassName + * + * @phan-return MockObject\MockObject&RealInstanceType + */ + protected function getMockForAbstractClass(string $originalClassName, array $arguments = [], string $mockClassName = '', bool $callOriginalConstructor = true, bool $callOriginalClone = true, bool $callAutoload = true, array $mockedMethods = [], bool $cloneArguments = false): \PHPUnit\Framework\MockObject\MockObject + { + } + /** + * Returns a mock object based on the given WSDL file. + * + * @phan-template RealInstanceType of object + * + * @phan-param class-string|string $originalClassName + * + * @phan-return MockObject\MockObject&RealInstanceType + */ + protected function getMockFromWsdl(string $wsdlFile, string $originalClassName = '', string $mockClassName = '', array $methods = [], bool $callOriginalConstructor = true, array $options = []): \PHPUnit\Framework\MockObject\MockObject + { + } + /** + * Returns a mock object for the specified trait with all abstract methods + * of the trait mocked. Concrete methods to mock can be specified with the + * `$mockedMethods` parameter. + * + * @phan-param trait-string $traitName + */ + protected function getMockForTrait(string $traitName, array $arguments = [], string $mockClassName = '', bool $callOriginalConstructor = true, bool $callOriginalClone = true, bool $callAutoload = true, array $mockedMethods = [], bool $cloneArguments = false): \PHPUnit\Framework\MockObject\MockObject + { + } + /** + * Returns an object for the specified trait. + * + * @phan-param trait-string $traitName + */ + protected function getObjectForTrait(string $traitName, array $arguments = [], string $traitClassName = '', bool $callOriginalConstructor = true, bool $callOriginalClone = true, bool $callAutoload = true): object + { + } + /** + * @throws \Prophecy\Exception\Doubler\ClassNotFoundException + * @throws \Prophecy\Exception\Doubler\DoubleException + * @throws \Prophecy\Exception\Doubler\InterfaceNotFoundException + * + * @phan-param class-string|null $classOrInterface + * + * @deprecated https://github.com/sebastianbergmann/phpunit/issues/4141 + */ + protected function prophesize(?string $classOrInterface = null): \Prophecy\Prophecy\ObjectProphecy + { + } + /** + * Creates a default TestResult object. + * + * @internal This method is not covered by the backward compatibility promise for PHPUnit + */ + protected function createResult(): \PHPUnit\Framework\TestResult + { + } + /** + * This method is called when a test method did not execute successfully. + * + * @throws \Throwable + */ + protected function onNotSuccessfulTest(\Throwable $t): void + { + } + protected function recordDoubledType(string $originalClassName): void + { + } } /** - * Returns a matcher that matches when the method is executed - * at the given index. + * @internal This class is not covered by the backward compatibility promise for PHPUnit */ -function at(int $index): \PHPUnit\Framework\MockObject\Rule\InvokedAtIndex -{ -} -function returnValue($value): \PHPUnit\Framework\MockObject\Stub\ReturnStub -{ -} -function returnValueMap(array $valueMap): \PHPUnit\Framework\MockObject\Stub\ReturnValueMap -{ -} -function returnArgument(int $argumentIndex): \PHPUnit\Framework\MockObject\Stub\ReturnArgument -{ -} -function returnCallback($callback): \PHPUnit\Framework\MockObject\Stub\ReturnCallback +final class TestFailure { + /** + * Returns a description for an exception. + */ + public static function exceptionToString(\Throwable $e): string + { + } + /** + * Constructs a TestFailure with the given test and exception. + */ + public function __construct(\PHPUnit\Framework\Test $failedTest, \Throwable $t) + { + } + /** + * Returns a short description of the failure. + */ + public function toString(): string + { + } + /** + * Returns a description for the thrown exception. + */ + public function getExceptionAsString(): string + { + } + /** + * Returns the name of the failing test (including data set, if any). + */ + public function getTestName(): string + { + } + /** + * Returns the failing test. + * + * Note: The test object is not set when the test is executed in process + * isolation. + * + * @see Exception + */ + public function failedTest(): ?\PHPUnit\Framework\Test + { + } + /** + * Gets the thrown exception. + */ + public function thrownException(): \Throwable + { + } + /** + * Returns the exception's message. + */ + public function exceptionMessage(): string + { + } + /** + * Returns true if the thrown exception + * is of type AssertionFailedError. + */ + public function isFailure(): bool + { + } } /** - * Returns the current object. + * This interface, as well as the associated mechanism for extending PHPUnit, + * will be removed in PHPUnit 10. There is no alternative available in this + * version of PHPUnit. * - * This method is useful when mocking a fluent interface. + * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit + * + * @deprecated + * @see https://github.com/sebastianbergmann/phpunit/issues/4676 */ -function returnSelf(): \PHPUnit\Framework\MockObject\Stub\ReturnSelf -{ -} -function throwException(\Throwable $exception): \PHPUnit\Framework\MockObject\Stub\Exception -{ -} -function onConsecutiveCalls(...$func_get_args): \PHPUnit\Framework\MockObject\Stub\ConsecutiveCalls +interface TestListener { + public function addError(\PHPUnit\Framework\Test $test, \Throwable $t, float $time): void; + public function addWarning(\PHPUnit\Framework\Test $test, \PHPUnit\Framework\Warning $e, float $time): void; + public function addFailure(\PHPUnit\Framework\Test $test, \PHPUnit\Framework\AssertionFailedError $e, float $time): void; + public function addIncompleteTest(\PHPUnit\Framework\Test $test, \Throwable $t, float $time): void; + public function addRiskyTest(\PHPUnit\Framework\Test $test, \Throwable $t, float $time): void; + public function addSkippedTest(\PHPUnit\Framework\Test $test, \Throwable $t, float $time): void; + public function startTestSuite(\PHPUnit\Framework\TestSuite $suite): void; + public function endTestSuite(\PHPUnit\Framework\TestSuite $suite): void; + public function startTest(\PHPUnit\Framework\Test $test): void; + public function endTest(\PHPUnit\Framework\Test $test, float $time): void; } /** - * @internal This class is not covered by the backward compatibility promise for PHPUnit + * @deprecated The `TestListener` interface is deprecated + * + * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit */ -final class SkippedTestCase extends \PHPUnit\Framework\TestCase +trait TestListenerDefaultImplementation { - public function __construct(string $className, string $methodName, string $message = '') + public function addError(\PHPUnit\Framework\Test $test, \Throwable $t, float $time): void { } - public function getMessage(): string + public function addWarning(\PHPUnit\Framework\Test $test, \PHPUnit\Framework\Warning $e, float $time): void { } - /** - * Returns a string representation of the test case. - * - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - */ - public function toString(): string + public function addFailure(\PHPUnit\Framework\Test $test, \PHPUnit\Framework\AssertionFailedError $e, float $time): void + { + } + public function addIncompleteTest(\PHPUnit\Framework\Test $test, \Throwable $t, float $time): void + { + } + public function addRiskyTest(\PHPUnit\Framework\Test $test, \Throwable $t, float $time): void + { + } + public function addSkippedTest(\PHPUnit\Framework\Test $test, \Throwable $t, float $time): void + { + } + public function startTestSuite(\PHPUnit\Framework\TestSuite $suite): void + { + } + public function endTestSuite(\PHPUnit\Framework\TestSuite $suite): void + { + } + public function startTest(\PHPUnit\Framework\Test $test): void + { + } + public function endTest(\PHPUnit\Framework\Test $test, float $time): void { } -} -/** - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final class InvalidParameterGroupException extends \PHPUnit\Framework\Exception -{ } /** * @internal This class is not covered by the backward compatibility promise for PHPUnit @@ -5791,315 +5574,552 @@ public function passed(): array { } /** - * Returns the names of the TestSuites that have passed. - * - * This enables @depends-annotations for TestClassName::class + * Returns the names of the TestSuites that have passed. + * + * This enables @depends-annotations for TestClassName::class + */ + public function passedClasses(): array + { + } + /** + * Returns whether code coverage information should be collected. + */ + public function getCollectCodeCoverageInformation(): bool + { + } + /** + * Runs a TestCase. + * + * @throws \SebastianBergmann\CodeCoverage\InvalidArgumentException + * @throws CodeCoverageException + * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * @throws \SebastianBergmann\CodeCoverage\UnintentionallyCoveredCodeException + */ + public function run(\PHPUnit\Framework\Test $test): void + { + } + /** + * Gets the number of run tests. + */ + public function count(): int + { + } + /** + * Checks whether the test run should stop. + */ + public function shouldStop(): bool + { + } + /** + * Marks that the test run should stop. + */ + public function stop(): void + { + } + /** + * Returns the code coverage object. + */ + public function getCodeCoverage(): ?\SebastianBergmann\CodeCoverage\CodeCoverage + { + } + /** + * Sets the code coverage object. + */ + public function setCodeCoverage(\SebastianBergmann\CodeCoverage\CodeCoverage $codeCoverage): void + { + } + /** + * Enables or disables the deprecation-to-exception conversion. + */ + public function convertDeprecationsToExceptions(bool $flag): void + { + } + /** + * Returns the deprecation-to-exception conversion setting. + */ + public function getConvertDeprecationsToExceptions(): bool + { + } + /** + * Enables or disables the error-to-exception conversion. + */ + public function convertErrorsToExceptions(bool $flag): void + { + } + /** + * Returns the error-to-exception conversion setting. + */ + public function getConvertErrorsToExceptions(): bool + { + } + /** + * Enables or disables the notice-to-exception conversion. + */ + public function convertNoticesToExceptions(bool $flag): void + { + } + /** + * Returns the notice-to-exception conversion setting. + */ + public function getConvertNoticesToExceptions(): bool + { + } + /** + * Enables or disables the warning-to-exception conversion. + */ + public function convertWarningsToExceptions(bool $flag): void + { + } + /** + * Returns the warning-to-exception conversion setting. + */ + public function getConvertWarningsToExceptions(): bool + { + } + /** + * Enables or disables the stopping when an error occurs. + */ + public function stopOnError(bool $flag): void + { + } + /** + * Enables or disables the stopping when a failure occurs. + */ + public function stopOnFailure(bool $flag): void + { + } + /** + * Enables or disables the stopping when a warning occurs. + */ + public function stopOnWarning(bool $flag): void + { + } + public function beStrictAboutTestsThatDoNotTestAnything(bool $flag): void + { + } + public function isStrictAboutTestsThatDoNotTestAnything(): bool + { + } + public function beStrictAboutOutputDuringTests(bool $flag): void + { + } + public function isStrictAboutOutputDuringTests(): bool + { + } + public function beStrictAboutResourceUsageDuringSmallTests(bool $flag): void + { + } + public function isStrictAboutResourceUsageDuringSmallTests(): bool + { + } + public function enforceTimeLimit(bool $flag): void + { + } + public function enforcesTimeLimit(): bool + { + } + public function beStrictAboutTodoAnnotatedTests(bool $flag): void + { + } + public function isStrictAboutTodoAnnotatedTests(): bool + { + } + public function forceCoversAnnotation(): void + { + } + public function forcesCoversAnnotation(): bool + { + } + /** + * Enables or disables the stopping for risky tests. */ - public function passedClasses(): array + public function stopOnRisky(bool $flag): void { } /** - * Returns whether code coverage information should be collected. + * Enables or disables the stopping for incomplete tests. */ - public function getCollectCodeCoverageInformation(): bool + public function stopOnIncomplete(bool $flag): void { } /** - * Runs a TestCase. - * - * @throws \SebastianBergmann\CodeCoverage\InvalidArgumentException - * @throws CodeCoverageException - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * @throws \SebastianBergmann\CodeCoverage\UnintentionallyCoveredCodeException + * Enables or disables the stopping for skipped tests. */ - public function run(\PHPUnit\Framework\Test $test): void + public function stopOnSkipped(bool $flag): void { } /** - * Gets the number of run tests. + * Enables or disables the stopping for defects: error, failure, warning. */ - public function count(): int + public function stopOnDefect(bool $flag): void { } /** - * Checks whether the test run should stop. + * Returns the time spent running the tests. */ - public function shouldStop(): bool + public function time(): float { } /** - * Marks that the test run should stop. + * Returns whether the entire test was successful or not. */ - public function stop(): void + public function wasSuccessful(): bool { } - /** - * Returns the code coverage object. - */ - public function getCodeCoverage(): ?\SebastianBergmann\CodeCoverage\CodeCoverage + public function wasSuccessfulIgnoringWarnings(): bool { } - /** - * Sets the code coverage object. - */ - public function setCodeCoverage(\SebastianBergmann\CodeCoverage\CodeCoverage $codeCoverage): void + public function wasSuccessfulAndNoTestIsRiskyOrSkippedOrIncomplete(): bool { } /** - * Enables or disables the deprecation-to-exception conversion. + * Sets the default timeout for tests. */ - public function convertDeprecationsToExceptions(bool $flag): void + public function setDefaultTimeLimit(int $timeout): void { } /** - * Returns the deprecation-to-exception conversion setting. + * Sets the timeout for small tests. */ - public function getConvertDeprecationsToExceptions(): bool + public function setTimeoutForSmallTests(int $timeout): void { } /** - * Enables or disables the error-to-exception conversion. + * Sets the timeout for medium tests. */ - public function convertErrorsToExceptions(bool $flag): void + public function setTimeoutForMediumTests(int $timeout): void { } /** - * Returns the error-to-exception conversion setting. + * Sets the timeout for large tests. */ - public function getConvertErrorsToExceptions(): bool + public function setTimeoutForLargeTests(int $timeout): void { } /** - * Enables or disables the notice-to-exception conversion. + * Returns the set timeout for large tests. */ - public function convertNoticesToExceptions(bool $flag): void + public function getTimeoutForLargeTests(): int { } - /** - * Returns the notice-to-exception conversion setting. - */ - public function getConvertNoticesToExceptions(): bool + public function setRegisterMockObjectsFromTestArgumentsRecursively(bool $flag): void { } +} +/** + * @template-implements \IteratorAggregate + * + * @internal This class is not covered by the backward compatibility promise for PHPUnit + */ +class TestSuite implements \IteratorAggregate, \PHPUnit\Framework\Reorderable, \PHPUnit\Framework\SelfDescribing, \PHPUnit\Framework\Test +{ /** - * Enables or disables the warning-to-exception conversion. + * Enable or disable the backup and restoration of the $GLOBALS array. + * + * @var bool */ - public function convertWarningsToExceptions(bool $flag): void - { - } + protected $backupGlobals; /** - * Returns the warning-to-exception conversion setting. + * Enable or disable the backup and restoration of static attributes. + * + * @var bool */ - public function getConvertWarningsToExceptions(): bool - { - } + protected $backupStaticAttributes; /** - * Enables or disables the stopping when an error occurs. + * @var bool */ - public function stopOnError(bool $flag): void + protected $runTestInSeparateProcess = false; + /** + * The name of the test suite. + * + * @var string + */ + protected $name = ''; + /** + * The test groups of the test suite. + * + * @phan-var array> + */ + protected $groups = []; + /** + * The tests in the test suite. + * + * @var Test[] + */ + protected $tests = []; + /** + * The number of tests in the test suite. + * + * @var int + */ + protected $numTests = -1; + /** + * @var bool + */ + protected $testCase = false; + /** + * @var string[] + */ + protected $foundClasses = []; + /** + * @var null|list + */ + protected $providedTests; + /** + * @var null|list + */ + protected $requiredTests; + /** + * Constructs a new TestSuite. + * + * - PHPUnit\Framework\TestSuite() constructs an empty TestSuite. + * + * - PHPUnit\Framework\TestSuite(ReflectionClass) constructs a + * TestSuite from the given class. + * + * - PHPUnit\Framework\TestSuite(ReflectionClass, String) + * constructs a TestSuite from the given class with the given + * name. + * + * - PHPUnit\Framework\TestSuite(String) either constructs a + * TestSuite from the given class (if the passed string is the + * name of an existing class) or constructs an empty TestSuite + * with the given name. + * + * @param \ReflectionClass|string $theClass + * + * @throws Exception + */ + public function __construct($theClass = '', string $name = '') { } /** - * Enables or disables the stopping when a failure occurs. + * Returns a string representation of the test suite. */ - public function stopOnFailure(bool $flag): void + public function toString(): string { } /** - * Enables or disables the stopping when a warning occurs. + * Adds a test to the suite. + * + * @param array $groups */ - public function stopOnWarning(bool $flag): void + public function addTest(\PHPUnit\Framework\Test $test, $groups = []): void { } - public function beStrictAboutTestsThatDoNotTestAnything(bool $flag): void + /** + * Adds the tests from the given class to the suite. + * + * @phan-param object|class-string $testClass + * + * @throws Exception + */ + public function addTestSuite($testClass): void { } - public function isStrictAboutTestsThatDoNotTestAnything(): bool + public function addWarning(string $warning): void { } - public function beStrictAboutOutputDuringTests(bool $flag): void + /** + * Wraps both addTest() and addTestSuite + * as well as the separate import statements for the user's convenience. + * + * If the named file cannot be read or there are no new tests that can be + * added, a PHPUnit\Framework\WarningTestCase will be created instead, + * leaving the current test run untouched. + * + * @throws Exception + */ + public function addTestFile(string $filename): void { } - public function isStrictAboutOutputDuringTests(): bool + /** + * Wrapper for addTestFile() that adds multiple test files. + * + * @throws Exception + */ + public function addTestFiles(iterable $fileNames): void { } - public function beStrictAboutResourceUsageDuringSmallTests(bool $flag): void + /** + * Counts the number of test cases that will be run by this test. + * + * @todo refactor usage of numTests in DefaultResultPrinter + */ + public function count(): int { } - public function isStrictAboutResourceUsageDuringSmallTests(): bool + /** + * Returns the name of the suite. + */ + public function getName(): string { } - public function enforceTimeLimit(bool $flag): void + /** + * Returns the test groups of the suite. + * + * @phan-return list + */ + public function getGroups(): array { } - public function enforcesTimeLimit(): bool + public function getGroupDetails(): array { } - public function beStrictAboutTodoAnnotatedTests(bool $flag): void + /** + * Set tests groups of the test case. + */ + public function setGroupDetails(array $groups): void { } - public function isStrictAboutTodoAnnotatedTests(): bool + /** + * Runs the tests and collects their result in a TestResult. + * + * @throws \SebastianBergmann\CodeCoverage\InvalidArgumentException + * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * @throws CodeCoverageException + * @throws \SebastianBergmann\CodeCoverage\UnintentionallyCoveredCodeException + * @throws Warning + */ + public function run(?\PHPUnit\Framework\TestResult $result = null): \PHPUnit\Framework\TestResult { } - public function forceCoversAnnotation(): void + public function setRunTestInSeparateProcess(bool $runTestInSeparateProcess): void { } - public function forcesCoversAnnotation(): bool + public function setName(string $name): void { } /** - * Enables or disables the stopping for risky tests. + * Returns the tests as an enumeration. + * + * @return Test[] */ - public function stopOnRisky(bool $flag): void + public function tests(): array { } /** - * Enables or disables the stopping for incomplete tests. + * Set tests of the test suite. + * + * @param Test[] $tests */ - public function stopOnIncomplete(bool $flag): void + public function setTests(array $tests): void { } /** - * Enables or disables the stopping for skipped tests. + * Mark the test suite as skipped. + * + * @param string $message + * + * @throws SkippedTestSuiteError + * + * @phan-return never-return */ - public function stopOnSkipped(bool $flag): void + public function markTestSuiteSkipped($message = ''): void { } /** - * Enables or disables the stopping for defects: error, failure, warning. + * @param bool $beStrictAboutChangesToGlobalState */ - public function stopOnDefect(bool $flag): void + public function setBeStrictAboutChangesToGlobalState($beStrictAboutChangesToGlobalState): void { } /** - * Returns the time spent running the tests. + * @param bool $backupGlobals */ - public function time(): float + public function setBackupGlobals($backupGlobals): void { } /** - * Returns whether the entire test was successful or not. + * @param bool $backupStaticAttributes */ - public function wasSuccessful(): bool - { - } - public function wasSuccessfulIgnoringWarnings(): bool - { - } - public function wasSuccessfulAndNoTestIsRiskyOrSkippedOrIncomplete(): bool + public function setBackupStaticAttributes($backupStaticAttributes): void { } /** - * Sets the default timeout for tests. + * Returns an iterator for this test suite. */ - public function setDefaultTimeLimit(int $timeout): void + public function getIterator(): \Iterator { } - /** - * Sets the timeout for small tests. - */ - public function setTimeoutForSmallTests(int $timeout): void + public function injectFilter(\PHPUnit\Runner\Filter\Factory $filter): void { } /** - * Sets the timeout for medium tests. + * @phan-return array */ - public function setTimeoutForMediumTests(int $timeout): void + public function warnings(): array { } /** - * Sets the timeout for large tests. + * @return list */ - public function setTimeoutForLargeTests(int $timeout): void + public function provides(): array { } /** - * Returns the set timeout for large tests. + * @return list */ - public function getTimeoutForLargeTests(): int + public function requires(): array { } - public function setRegisterMockObjectsFromTestArgumentsRecursively(bool $flag): void + public function sortId(): string { } -} -/** - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -interface Reorderable -{ - public function sortId(): string; - /** - * @return list - */ - public function provides(): array; /** - * @return list + * Creates a default TestResult object. */ - public function requires(): array; -} -/** - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final class ErrorTestCase extends \PHPUnit\Framework\TestCase -{ - public function __construct(string $message = '') - { - } - public function getMessage(): string + protected function createResult(): \PHPUnit\Framework\TestResult { } /** - * Returns a string representation of the test case. + * @throws Exception */ - public function toString(): string + protected function addTestMethod(\ReflectionClass $class, \ReflectionMethod $method): void { } } /** - * @deprecated The `TestListener` interface is deprecated + * @template-implements \RecursiveIterator * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit + * @internal This class is not covered by the backward compatibility promise for PHPUnit */ -trait TestListenerDefaultImplementation +final class TestSuiteIterator implements \RecursiveIterator { - public function addError(\PHPUnit\Framework\Test $test, \Throwable $t, float $time): void - { - } - public function addWarning(\PHPUnit\Framework\Test $test, \PHPUnit\Framework\Warning $e, float $time): void - { - } - public function addFailure(\PHPUnit\Framework\Test $test, \PHPUnit\Framework\AssertionFailedError $e, float $time): void + public function __construct(\PHPUnit\Framework\TestSuite $testSuite) { } - public function addIncompleteTest(\PHPUnit\Framework\Test $test, \Throwable $t, float $time): void + public function rewind(): void { } - public function addRiskyTest(\PHPUnit\Framework\Test $test, \Throwable $t, float $time): void + public function valid(): bool { } - public function addSkippedTest(\PHPUnit\Framework\Test $test, \Throwable $t, float $time): void + public function key(): int { } - public function startTestSuite(\PHPUnit\Framework\TestSuite $suite): void + public function current(): \PHPUnit\Framework\Test { } - public function endTestSuite(\PHPUnit\Framework\TestSuite $suite): void + public function next(): void { } - public function startTest(\PHPUnit\Framework\Test $test): void + /** + * @throws NoChildTestSuiteException + */ + public function getChildren(): self { } - public function endTest(\PHPUnit\Framework\Test $test, float $time): void + public function hasChildren(): bool { } } /** * @internal This class is not covered by the backward compatibility promise for PHPUnit */ -final class IncompleteTestCase extends \PHPUnit\Framework\TestCase +final class WarningTestCase extends \PHPUnit\Framework\TestCase { - public function __construct(string $className, string $methodName, string $message = '') + public function __construct(string $message = '') { } public function getMessage(): string @@ -6107,53 +6127,51 @@ public function getMessage(): string } /** * Returns a string representation of the test case. - * - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException */ public function toString(): string { } } +namespace PHPUnit\Framework\Constraint; + /** - * @internal This class is not covered by the backward compatibility promise for PHPUnit + * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit */ -final class WarningTestCase extends \PHPUnit\Framework\TestCase +final class IsFalse extends \PHPUnit\Framework\Constraint\Constraint { - public function __construct(string $message = '') - { - } - public function getMessage(): string - { - } /** - * Returns a string representation of the test case. + * Returns a string representation of the constraint. */ public function toString(): string { } } -namespace PHPUnit\Framework\Constraint; - /** * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit */ -final class ExceptionMessageRegularExpression extends \PHPUnit\Framework\Constraint\Constraint +final class IsTrue extends \PHPUnit\Framework\Constraint\Constraint { - public function __construct(string $expected) - { - } + /** + * Returns a string representation of the constraint. + */ public function toString(): string { } } /** + * @phan-template CallbackInput of mixed + * * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit */ -final class ExceptionMessage extends \PHPUnit\Framework\Constraint\Constraint +final class Callback extends \PHPUnit\Framework\Constraint\Constraint { - public function __construct(string $expected) + /** @phan-param callable(CallbackInput $input): bool $callback */ + public function __construct(callable $callback) { } + /** + * Returns a string representation of the constraint. + */ public function toString(): string { } @@ -6161,28 +6179,63 @@ public function toString(): string /** * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit */ -final class ExceptionCode extends \PHPUnit\Framework\Constraint\Constraint +class Count extends \PHPUnit\Framework\Constraint\Constraint { + public function __construct(int $expected) + { + } + public function toString(): string + { + } /** - * @param int|string $expected + * Evaluates the constraint for parameter $other. Returns true if the + * constraint is met, false otherwise. + * + * @throws \PHPUnit\Framework\Exception */ - public function __construct($expected) + protected function matches($other): bool { } - public function toString(): string + /** + * @throws \PHPUnit\Framework\Exception + */ + protected function getCountOf($other): ?int + { + } + /** + * Returns the total number of iterations from a generator. + * This will fully exhaust the generator. + */ + protected function getCountOfGenerator(\Generator $generator): int + { + } + /** + * Returns the description of the failure. + * + * The beginning of failure messages is "Failed asserting that" in most + * cases. This method should return the second part of that sentence. + * + * @param mixed $other evaluated value or object + */ + protected function failureDescription($other): string { } } /** * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit */ -final class Exception extends \PHPUnit\Framework\Constraint\Constraint +final class GreaterThan extends \PHPUnit\Framework\Constraint\Constraint { - public function __construct(string $className) + /** + * @param float|int $value + */ + public function __construct($value) { } /** * Returns a string representation of the constraint. + * + * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException */ public function toString(): string { @@ -6191,7 +6244,7 @@ public function toString(): string /** * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit */ -final class IsReadable extends \PHPUnit\Framework\Constraint\Constraint +final class IsEmpty extends \PHPUnit\Framework\Constraint\Constraint { /** * Returns a string representation of the constraint. @@ -6203,10 +6256,18 @@ public function toString(): string /** * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit */ -final class DirectoryExists extends \PHPUnit\Framework\Constraint\Constraint +final class LessThan extends \PHPUnit\Framework\Constraint\Constraint { + /** + * @param float|int $value + */ + public function __construct($value) + { + } /** * Returns a string representation of the constraint. + * + * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException */ public function toString(): string { @@ -6215,74 +6276,194 @@ public function toString(): string /** * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit */ -final class FileExists extends \PHPUnit\Framework\Constraint\Constraint +final class SameSize extends \PHPUnit\Framework\Constraint\Count +{ + public function __construct(iterable $expected) + { + } +} +/** + * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit + */ +abstract class Constraint implements \Countable, \PHPUnit\Framework\SelfDescribing { /** - * Returns a string representation of the constraint. + * Evaluates the constraint for parameter $other. + * + * If $returnResult is set to false (the default), an exception is thrown + * in case of a failure. null is returned otherwise. + * + * If $returnResult is true, the result of the evaluation is returned as + * a boolean value instead: true in case of success, false in case of a + * failure. + * + * @throws \PHPUnit\Framework\ExpectationFailedException + * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + */ + public function evaluate($other, string $description = '', bool $returnResult = false): ?bool + { + } + /** + * Counts the number of constraint elements. + */ + public function count(): int + { + } + protected function exporter(): \SebastianBergmann\Exporter\Exporter + { + } + /** + * Evaluates the constraint for parameter $other. Returns true if the + * constraint is met, false otherwise. + * + * This method can be overridden to implement the evaluation algorithm. + * + * @param mixed $other value or object to evaluate + * + * @codeCoverageIgnore + */ + protected function matches($other): bool + { + } + /** + * Throws an exception for the given compared value and test description. + * + * @param mixed $other evaluated value or object + * @param string $description Additional information about the test + * + * @throws \PHPUnit\Framework\ExpectationFailedException + * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * + * @phan-return never-return */ - public function toString(): string + protected function fail($other, $description, ?\SebastianBergmann\Comparator\ComparisonFailure $comparisonFailure = null): void { } -} -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - */ -final class IsWritable extends \PHPUnit\Framework\Constraint\Constraint -{ /** - * Returns a string representation of the constraint. + * Return additional failure description where needed. + * + * The function can be overridden to provide additional failure + * information like a diff + * + * @param mixed $other evaluated value or object */ - public function toString(): string + protected function additionalFailureDescription($other): string { } -} -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - */ -final class JsonMatchesErrorMessageProvider -{ /** - * Translates JSON error to a human readable string. + * Returns the description of the failure. + * + * The beginning of failure messages is "Failed asserting that" in most + * cases. This method should return the second part of that sentence. + * + * To provide additional failure information additionalFailureDescription + * can be used. + * + * @param mixed $other evaluated value or object + * + * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException */ - public static function determineJsonError(string $error, string $prefix = ''): ?string + protected function failureDescription($other): string { } /** - * Translates a given type to a human readable message prefix. + * Returns a custom string representation of the constraint object when it + * appears in context of an $operator expression. + * + * The purpose of this method is to provide meaningful descriptive string + * in context of operators such as LogicalNot. Native PHPUnit constraints + * are supported out of the box by LogicalNot, but externally developed + * ones had no way to provide correct strings in this context. + * + * The method shall return empty string, when it does not handle + * customization by itself. + * + * @param Operator $operator the $operator of the expression + * @param mixed $role role of $this constraint in the $operator expression */ - public static function translateTypeToPrefix(string $type): string - { - } -} -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - */ -final class IsEqualCanonicalizing extends \PHPUnit\Framework\Constraint\Constraint -{ - public function __construct($value) + protected function toStringInContext(\PHPUnit\Framework\Constraint\Operator $operator, $role): string { } /** - * Evaluates the constraint for parameter $other. + * Returns the description of the failure when this constraint appears in + * context of an $operator expression. * - * If $returnResult is set to false (the default), an exception is thrown - * in case of a failure. null is returned otherwise. + * The purpose of this method is to provide meaningful failure description + * in context of operators such as LogicalNot. Native PHPUnit constraints + * are supported out of the box by LogicalNot, but externally developed + * ones had no way to provide correct messages in this context. * - * If $returnResult is true, the result of the evaluation is returned as - * a boolean value instead: true in case of success, false in case of a - * failure. + * The method shall return empty string, when it does not handle + * customization by itself. * - * @throws \PHPUnit\Framework\ExpectationFailedException + * @param Operator $operator the $operator of the expression + * @param mixed $role role of $this constraint in the $operator expression + * @param mixed $other evaluated value or object */ - public function evaluate($other, string $description = '', bool $returnResult = false): ?bool + protected function failureDescriptionInContext(\PHPUnit\Framework\Constraint\Operator $operator, $role, $other): string { } /** - * Returns a string representation of the constraint. + * Reduces the sub-expression starting at $this by skipping degenerate + * sub-expression and returns first descendant constraint that starts + * a non-reducible sub-expression. * - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * Returns $this for terminal constraints and for operators that start + * non-reducible sub-expression, or the nearest descendant of $this that + * starts a non-reducible sub-expression. + * + * A constraint expression may be modelled as a tree with non-terminal + * nodes (operators) and terminal nodes. For example: + * + * LogicalOr (operator, non-terminal) + * + LogicalAnd (operator, non-terminal) + * | + IsType('int') (terminal) + * | + GreaterThan(10) (terminal) + * + LogicalNot (operator, non-terminal) + * + IsType('array') (terminal) + * + * A degenerate sub-expression is a part of the tree, that effectively does + * not contribute to the evaluation of the expression it appears in. An example + * of degenerate sub-expression is a BinaryOperator constructed with single + * operand or nested BinaryOperators, each with single operand. An + * expression involving a degenerate sub-expression is equivalent to a + * reduced expression with the degenerate sub-expression removed, for example + * + * LogicalAnd (operator) + * + LogicalOr (degenerate operator) + * | + LogicalAnd (degenerate operator) + * | + IsType('int') (terminal) + * + GreaterThan(10) (terminal) + * + * is equivalent to + * + * LogicalAnd (operator) + * + IsType('int') (terminal) + * + GreaterThan(10) (terminal) + * + * because the subexpression + * + * + LogicalOr + * + LogicalAnd + * + - + * + * is degenerate. Calling reduce() on the LogicalOr object above, as well + * as on LogicalAnd, shall return the IsType('int') instance. + * + * Other specific reductions can be implemented, for example cascade of + * LogicalNot operators + * + * + LogicalNot + * + LogicalNot + * +LogicalNot + * + IsTrue + * + * can be reduced to + * + * LogicalNot + * + IsTrue */ - public function toString(): string + protected function reduce(): self { } } @@ -6321,9 +6502,9 @@ public function toString(): string /** * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit */ -final class IsEqualWithDelta extends \PHPUnit\Framework\Constraint\Constraint +final class IsEqualCanonicalizing extends \PHPUnit\Framework\Constraint\Constraint { - public function __construct($value, float $delta) + public function __construct($value) { } /** @@ -6385,12 +6566,9 @@ public function toString(): string /** * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit */ -final class TraversableContainsOnly extends \PHPUnit\Framework\Constraint\Constraint +final class IsEqualWithDelta extends \PHPUnit\Framework\Constraint\Constraint { - /** - * @throws \PHPUnit\Framework\Exception - */ - public function __construct(string $type, bool $isNativeType = true) + public function __construct($value, float $delta) { } /** @@ -6403,71 +6581,11 @@ public function __construct(string $type, bool $isNativeType = true) * a boolean value instead: true in case of success, false in case of a * failure. * - * @param mixed|\Traversable $other - * * @throws \PHPUnit\Framework\ExpectationFailedException - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException */ public function evaluate($other, string $description = '', bool $returnResult = false): ?bool { } - /** - * Returns a string representation of the constraint. - */ - public function toString(): string - { - } -} -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - */ -abstract class TraversableContains extends \PHPUnit\Framework\Constraint\Constraint -{ - public function __construct($value) - { - } - /** - * Returns a string representation of the constraint. - * - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - */ - public function toString(): string - { - } - /** - * Returns the description of the failure. - * - * The beginning of failure messages is "Failed asserting that" in most - * cases. This method should return the second part of that sentence. - * - * @param mixed $other evaluated value or object - * - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - */ - protected function failureDescription($other): string - { - } - protected function value() - { - } -} -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - */ -final class TraversableContainsEqual extends \PHPUnit\Framework\Constraint\TraversableContains -{ -} -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - */ -final class ArrayHasKey extends \PHPUnit\Framework\Constraint\Constraint -{ - /** - * @param int|string $key - */ - public function __construct($key) - { - } /** * Returns a string representation of the constraint. * @@ -6480,43 +6598,9 @@ public function toString(): string /** * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit */ -final class TraversableContainsIdentical extends \PHPUnit\Framework\Constraint\TraversableContains -{ -} -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @deprecated https://github.com/sebastianbergmann/phpunit/issues/4601 - */ -final class ClassHasStaticAttribute extends \PHPUnit\Framework\Constraint\ClassHasAttribute -{ - /** - * Returns a string representation of the constraint. - */ - public function toString(): string - { - } -} -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - */ -final class ObjectEquals extends \PHPUnit\Framework\Constraint\Constraint -{ - public function __construct(object $object, string $method = 'equals') - { - } - public function toString(): string - { - } -} -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @deprecated https://github.com/sebastianbergmann/phpunit/issues/4601 - */ -class ClassHasAttribute extends \PHPUnit\Framework\Constraint\Constraint +final class Exception extends \PHPUnit\Framework\Constraint\Constraint { - public function __construct(string $attributeName) + public function __construct(string $className) { } /** @@ -6525,57 +6609,50 @@ public function __construct(string $attributeName) public function toString(): string { } +} +/** + * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit + */ +final class ExceptionCode extends \PHPUnit\Framework\Constraint\Constraint +{ /** - * Evaluates the constraint for parameter $other. Returns true if the - * constraint is met, false otherwise. - * - * @param mixed $other value or object to evaluate - */ - protected function matches($other): bool - { - } - /** - * Returns the description of the failure. - * - * The beginning of failure messages is "Failed asserting that" in most - * cases. This method should return the second part of that sentence. - * - * @param mixed $other evaluated value or object + * @param int|string $expected */ - protected function failureDescription($other): string + public function __construct($expected) { } - protected function attributeName(): string + public function toString(): string { } } /** * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit */ -final class ObjectHasProperty extends \PHPUnit\Framework\Constraint\Constraint +final class ExceptionMessage extends \PHPUnit\Framework\Constraint\Constraint { - public function __construct(string $propertyName) + public function __construct(string $expected) { } - /** - * Returns a string representation of the constraint. - */ public function toString(): string { } } /** * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @deprecated https://github.com/sebastianbergmann/phpunit/issues/4601 */ -final class ObjectHasAttribute extends \PHPUnit\Framework\Constraint\ClassHasAttribute +final class ExceptionMessageRegularExpression extends \PHPUnit\Framework\Constraint\Constraint { + public function __construct(string $expected) + { + } + public function toString(): string + { + } } /** * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit */ -final class IsFinite extends \PHPUnit\Framework\Constraint\Constraint +final class DirectoryExists extends \PHPUnit\Framework\Constraint\Constraint { /** * Returns a string representation of the constraint. @@ -6587,7 +6664,7 @@ public function toString(): string /** * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit */ -final class IsNan extends \PHPUnit\Framework\Constraint\Constraint +final class FileExists extends \PHPUnit\Framework\Constraint\Constraint { /** * Returns a string representation of the constraint. @@ -6599,7 +6676,7 @@ public function toString(): string /** * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit */ -final class IsInfinite extends \PHPUnit\Framework\Constraint\Constraint +final class IsReadable extends \PHPUnit\Framework\Constraint\Constraint { /** * Returns a string representation of the constraint. @@ -6611,31 +6688,10 @@ public function toString(): string /** * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit */ -final class IsIdentical extends \PHPUnit\Framework\Constraint\Constraint +final class IsWritable extends \PHPUnit\Framework\Constraint\Constraint { - public function __construct($value) - { - } - /** - * Evaluates the constraint for parameter $other. - * - * If $returnResult is set to false (the default), an exception is thrown - * in case of a failure. null is returned otherwise. - * - * If $returnResult is true, the result of the evaluation is returned as - * a boolean value instead: true in case of success, false in case of a - * failure. - * - * @throws \PHPUnit\Framework\ExpectationFailedException - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - */ - public function evaluate($other, string $description = '', bool $returnResult = false): ?bool - { - } /** * Returns a string representation of the constraint. - * - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException */ public function toString(): string { @@ -6644,7 +6700,7 @@ public function toString(): string /** * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit */ -abstract class Constraint implements \Countable, \PHPUnit\Framework\SelfDescribing +final class IsAnything extends \PHPUnit\Framework\Constraint\Constraint { /** * Evaluates the constraint for parameter $other. @@ -6657,280 +6713,133 @@ abstract class Constraint implements \Countable, \PHPUnit\Framework\SelfDescribi * failure. * * @throws \PHPUnit\Framework\ExpectationFailedException - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException */ public function evaluate($other, string $description = '', bool $returnResult = false): ?bool { } /** - * Counts the number of constraint elements. - */ - public function count(): int - { - } - protected function exporter(): \SebastianBergmann\Exporter\Exporter - { - } - /** - * Evaluates the constraint for parameter $other. Returns true if the - * constraint is met, false otherwise. - * - * This method can be overridden to implement the evaluation algorithm. - * - * @param mixed $other value or object to evaluate - * - * @codeCoverageIgnore - */ - protected function matches($other): bool - { - } - /** - * Throws an exception for the given compared value and test description. - * - * @param mixed $other evaluated value or object - * @param string $description Additional information about the test - * - * @throws \PHPUnit\Framework\ExpectationFailedException - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * - * @phan-return never-return - */ - protected function fail($other, $description, ?\SebastianBergmann\Comparator\ComparisonFailure $comparisonFailure = null): void - { - } - /** - * Return additional failure description where needed. - * - * The function can be overridden to provide additional failure - * information like a diff - * - * @param mixed $other evaluated value or object - */ - protected function additionalFailureDescription($other): string - { - } - /** - * Returns the description of the failure. - * - * The beginning of failure messages is "Failed asserting that" in most - * cases. This method should return the second part of that sentence. - * - * To provide additional failure information additionalFailureDescription - * can be used. - * - * @param mixed $other evaluated value or object - * - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - */ - protected function failureDescription($other): string - { - } - /** - * Returns a custom string representation of the constraint object when it - * appears in context of an $operator expression. - * - * The purpose of this method is to provide meaningful descriptive string - * in context of operators such as LogicalNot. Native PHPUnit constraints - * are supported out of the box by LogicalNot, but externally developed - * ones had no way to provide correct strings in this context. - * - * The method shall return empty string, when it does not handle - * customization by itself. - * - * @param Operator $operator the $operator of the expression - * @param mixed $role role of $this constraint in the $operator expression - */ - protected function toStringInContext(\PHPUnit\Framework\Constraint\Operator $operator, $role): string - { - } - /** - * Returns the description of the failure when this constraint appears in - * context of an $operator expression. - * - * The purpose of this method is to provide meaningful failure description - * in context of operators such as LogicalNot. Native PHPUnit constraints - * are supported out of the box by LogicalNot, but externally developed - * ones had no way to provide correct messages in this context. - * - * The method shall return empty string, when it does not handle - * customization by itself. - * - * @param Operator $operator the $operator of the expression - * @param mixed $role role of $this constraint in the $operator expression - * @param mixed $other evaluated value or object + * Returns a string representation of the constraint. */ - protected function failureDescriptionInContext(\PHPUnit\Framework\Constraint\Operator $operator, $role, $other): string + public function toString(): string { } /** - * Reduces the sub-expression starting at $this by skipping degenerate - * sub-expression and returns first descendant constraint that starts - * a non-reducible sub-expression. - * - * Returns $this for terminal constraints and for operators that start - * non-reducible sub-expression, or the nearest descendant of $this that - * starts a non-reducible sub-expression. - * - * A constraint expression may be modelled as a tree with non-terminal - * nodes (operators) and terminal nodes. For example: - * - * LogicalOr (operator, non-terminal) - * + LogicalAnd (operator, non-terminal) - * | + IsType('int') (terminal) - * | + GreaterThan(10) (terminal) - * + LogicalNot (operator, non-terminal) - * + IsType('array') (terminal) - * - * A degenerate sub-expression is a part of the tree, that effectively does - * not contribute to the evaluation of the expression it appears in. An example - * of degenerate sub-expression is a BinaryOperator constructed with single - * operand or nested BinaryOperators, each with single operand. An - * expression involving a degenerate sub-expression is equivalent to a - * reduced expression with the degenerate sub-expression removed, for example - * - * LogicalAnd (operator) - * + LogicalOr (degenerate operator) - * | + LogicalAnd (degenerate operator) - * | + IsType('int') (terminal) - * + GreaterThan(10) (terminal) - * - * is equivalent to - * - * LogicalAnd (operator) - * + IsType('int') (terminal) - * + GreaterThan(10) (terminal) - * - * because the subexpression - * - * + LogicalOr - * + LogicalAnd - * + - - * - * is degenerate. Calling reduce() on the LogicalOr object above, as well - * as on LogicalAnd, shall return the IsType('int') instance. - * - * Other specific reductions can be implemented, for example cascade of - * LogicalNot operators - * - * + LogicalNot - * + LogicalNot - * +LogicalNot - * + IsTrue - * - * can be reduced to - * - * LogicalNot - * + IsTrue + * Counts the number of constraint elements. */ - protected function reduce(): self + public function count(): int { } } /** * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit */ -abstract class Operator extends \PHPUnit\Framework\Constraint\Constraint +final class IsIdentical extends \PHPUnit\Framework\Constraint\Constraint { + public function __construct($value) + { + } /** - * Returns the name of this operator. - */ - abstract public function operator(): string; - /** - * Returns this operator's precedence. + * Evaluates the constraint for parameter $other. * - * @see https://www.php.net/manual/en/language.operators.precedence.php - */ - abstract public function precedence(): int; - /** - * Returns the number of operands. - */ - abstract public function arity(): int; - /** - * Validates $constraint argument. + * If $returnResult is set to false (the default), an exception is thrown + * in case of a failure. null is returned otherwise. + * + * If $returnResult is true, the result of the evaluation is returned as + * a boolean value instead: true in case of success, false in case of a + * failure. + * + * @throws \PHPUnit\Framework\ExpectationFailedException + * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException */ - protected function checkConstraint($constraint): \PHPUnit\Framework\Constraint\Constraint + public function evaluate($other, string $description = '', bool $returnResult = false): ?bool { } /** - * Returns true if the $constraint needs to be wrapped with braces. + * Returns a string representation of the constraint. + * + * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException */ - protected function constraintNeedsParentheses(\PHPUnit\Framework\Constraint\Constraint $constraint): bool + public function toString(): string { } } /** * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit */ -final class LogicalOr extends \PHPUnit\Framework\Constraint\BinaryOperator +final class JsonMatches extends \PHPUnit\Framework\Constraint\Constraint { - /** - * Returns the name of this operator. - */ - public function operator(): string - { - } - /** - * Returns this operator's precedence. - * - * @see https://www.php.net/manual/en/language.operators.precedence.php - */ - public function precedence(): int + public function __construct(string $value) { } /** - * Evaluates the constraint for parameter $other. Returns true if the - * constraint is met, false otherwise. - * - * @param mixed $other value or object to evaluate + * Returns a string representation of the object. */ - public function matches($other): bool + public function toString(): string { } } /** * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit */ -final class LogicalXor extends \PHPUnit\Framework\Constraint\BinaryOperator +final class JsonMatchesErrorMessageProvider { /** - * Returns the name of this operator. + * Translates JSON error to a human readable string. */ - public function operator(): string + public static function determineJsonError(string $error, string $prefix = ''): ?string { } /** - * Returns this operator's precedence. - * - * @see https://www.php.net/manual/en/language.operators.precedence.php. + * Translates a given type to a human readable message prefix. */ - public function precedence(): int + public static function translateTypeToPrefix(string $type): string { } +} +/** + * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit + */ +final class IsFinite extends \PHPUnit\Framework\Constraint\Constraint +{ /** - * Evaluates the constraint for parameter $other. Returns true if the - * constraint is met, false otherwise. - * - * @param mixed $other value or object to evaluate + * Returns a string representation of the constraint. */ - public function matches($other): bool + public function toString(): string { } } /** * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit */ -abstract class UnaryOperator extends \PHPUnit\Framework\Constraint\Operator +final class IsInfinite extends \PHPUnit\Framework\Constraint\Constraint { /** - * @param Constraint|mixed $constraint + * Returns a string representation of the constraint. */ - public function __construct($constraint) + public function toString(): string { } +} +/** + * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit + */ +final class IsNan extends \PHPUnit\Framework\Constraint\Constraint +{ /** - * Returns the number of operands (constraints). + * Returns a string representation of the constraint. */ - public function arity(): int + public function toString(): string + { + } +} +/** + * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit + * + * @deprecated https://github.com/sebastianbergmann/phpunit/issues/4601 + */ +class ClassHasAttribute extends \PHPUnit\Framework\Constraint\Constraint +{ + public function __construct(string $attributeName) { } /** @@ -6940,9 +6849,12 @@ public function toString(): string { } /** - * Counts the number of constraint elements. + * Evaluates the constraint for parameter $other. Returns true if the + * constraint is met, false otherwise. + * + * @param mixed $other value or object to evaluate */ - public function count(): int + protected function matches($other): bool { } /** @@ -6952,79 +6864,60 @@ public function count(): int * cases. This method should return the second part of that sentence. * * @param mixed $other evaluated value or object - * - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException */ protected function failureDescription($other): string { } - /** - * Transforms string returned by the memeber constraint's toString() or - * failureDescription() such that it reflects constraint's participation in - * this expression. - * - * The method may be overwritten in a subclass to apply default - * transformation in case the operand constraint does not provide its own - * custom strings via toStringInContext() or failureDescriptionInContext(). - * - * @param string $string the string to be transformed - */ - protected function transformString(string $string): string - { - } - /** - * Provides access to $this->constraint for subclasses. - */ - final protected function constraint(): \PHPUnit\Framework\Constraint\Constraint + protected function attributeName(): string { } +} +/** + * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit + * + * @deprecated https://github.com/sebastianbergmann/phpunit/issues/4601 + */ +final class ClassHasStaticAttribute extends \PHPUnit\Framework\Constraint\ClassHasAttribute +{ /** - * Returns true if the $constraint needs to be wrapped with parentheses. + * Returns a string representation of the constraint. */ - protected function constraintNeedsParentheses(\PHPUnit\Framework\Constraint\Constraint $constraint): bool + public function toString(): string { } } /** * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit */ -final class LogicalAnd extends \PHPUnit\Framework\Constraint\BinaryOperator +final class ObjectEquals extends \PHPUnit\Framework\Constraint\Constraint { - /** - * Returns the name of this operator. - */ - public function operator(): string + public function __construct(object $object, string $method = 'equals') { } - /** - * Returns this operator's precedence. - * - * @see https://www.php.net/manual/en/language.operators.precedence.php - */ - public function precedence(): int + public function toString(): string { } } /** * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit + * + * @deprecated https://github.com/sebastianbergmann/phpunit/issues/4601 */ -final class LogicalNot extends \PHPUnit\Framework\Constraint\UnaryOperator +final class ObjectHasAttribute extends \PHPUnit\Framework\Constraint\ClassHasAttribute { - public static function negate(string $string): string - { - } - /** - * Returns the name of this operator. - */ - public function operator(): string +} +/** + * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit + */ +final class ObjectHasProperty extends \PHPUnit\Framework\Constraint\Constraint +{ + public function __construct(string $propertyName) { } /** - * Returns this operator's precedence. - * - * @see https://www.php.net/manual/en/language.operators.precedence.php + * Returns a string representation of the constraint. */ - public function precedence(): int + public function toString(): string { } } @@ -7086,173 +6979,163 @@ protected function reduce(): \PHPUnit\Framework\Constraint\Constraint /** * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit */ -final class IsAnything extends \PHPUnit\Framework\Constraint\Constraint +final class LogicalAnd extends \PHPUnit\Framework\Constraint\BinaryOperator { /** - * Evaluates the constraint for parameter $other. - * - * If $returnResult is set to false (the default), an exception is thrown - * in case of a failure. null is returned otherwise. - * - * If $returnResult is true, the result of the evaluation is returned as - * a boolean value instead: true in case of success, false in case of a - * failure. - * - * @throws \PHPUnit\Framework\ExpectationFailedException - */ - public function evaluate($other, string $description = '', bool $returnResult = false): ?bool - { - } - /** - * Returns a string representation of the constraint. + * Returns the name of this operator. */ - public function toString(): string + public function operator(): string { } /** - * Counts the number of constraint elements. + * Returns this operator's precedence. + * + * @see https://www.php.net/manual/en/language.operators.precedence.php */ - public function count(): int + public function precedence(): int { } } /** * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit */ -final class IsNull extends \PHPUnit\Framework\Constraint\Constraint +final class LogicalNot extends \PHPUnit\Framework\Constraint\UnaryOperator { - /** - * Returns a string representation of the constraint. - */ - public function toString(): string + public static function negate(string $string): string { } -} -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - */ -final class IsType extends \PHPUnit\Framework\Constraint\Constraint -{ - /** - * @var string - */ - public const TYPE_ARRAY = 'array'; - /** - * @var string - */ - public const TYPE_BOOL = 'bool'; - /** - * @var string - */ - public const TYPE_FLOAT = 'float'; - /** - * @var string - */ - public const TYPE_INT = 'int'; - /** - * @var string - */ - public const TYPE_NULL = 'null'; - /** - * @var string - */ - public const TYPE_NUMERIC = 'numeric'; - /** - * @var string - */ - public const TYPE_OBJECT = 'object'; - /** - * @var string - */ - public const TYPE_RESOURCE = 'resource'; - /** - * @var string - */ - public const TYPE_CLOSED_RESOURCE = 'resource (closed)'; - /** - * @var string - */ - public const TYPE_STRING = 'string'; /** - * @var string + * Returns the name of this operator. */ - public const TYPE_SCALAR = 'scalar'; + public function operator(): string + { + } /** - * @var string + * Returns this operator's precedence. + * + * @see https://www.php.net/manual/en/language.operators.precedence.php */ - public const TYPE_CALLABLE = 'callable'; + public function precedence(): int + { + } +} +/** + * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit + */ +final class LogicalOr extends \PHPUnit\Framework\Constraint\BinaryOperator +{ /** - * @var string + * Returns the name of this operator. */ - public const TYPE_ITERABLE = 'iterable'; + public function operator(): string + { + } /** - * @throws \PHPUnit\Framework\Exception + * Returns this operator's precedence. + * + * @see https://www.php.net/manual/en/language.operators.precedence.php */ - public function __construct(string $type) + public function precedence(): int { } /** - * Returns a string representation of the constraint. + * Evaluates the constraint for parameter $other. Returns true if the + * constraint is met, false otherwise. + * + * @param mixed $other value or object to evaluate */ - public function toString(): string + public function matches($other): bool { } } /** * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit */ -final class IsInstanceOf extends \PHPUnit\Framework\Constraint\Constraint +final class LogicalXor extends \PHPUnit\Framework\Constraint\BinaryOperator { - public function __construct(string $className) + /** + * Returns the name of this operator. + */ + public function operator(): string { } /** - * Returns a string representation of the constraint. + * Returns this operator's precedence. + * + * @see https://www.php.net/manual/en/language.operators.precedence.php. */ - public function toString(): string + public function precedence(): int + { + } + /** + * Evaluates the constraint for parameter $other. Returns true if the + * constraint is met, false otherwise. + * + * @param mixed $other value or object to evaluate + */ + public function matches($other): bool { } } /** * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit */ -final class SameSize extends \PHPUnit\Framework\Constraint\Count +abstract class Operator extends \PHPUnit\Framework\Constraint\Constraint { - public function __construct(iterable $expected) + /** + * Returns the name of this operator. + */ + abstract public function operator(): string; + /** + * Returns this operator's precedence. + * + * @see https://www.php.net/manual/en/language.operators.precedence.php + */ + abstract public function precedence(): int; + /** + * Returns the number of operands. + */ + abstract public function arity(): int; + /** + * Validates $constraint argument. + */ + protected function checkConstraint($constraint): \PHPUnit\Framework\Constraint\Constraint + { + } + /** + * Returns true if the $constraint needs to be wrapped with braces. + */ + protected function constraintNeedsParentheses(\PHPUnit\Framework\Constraint\Constraint $constraint): bool { } } /** * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit */ -class Count extends \PHPUnit\Framework\Constraint\Constraint +abstract class UnaryOperator extends \PHPUnit\Framework\Constraint\Operator { - public function __construct(int $expected) - { - } - public function toString(): string + /** + * @param Constraint|mixed $constraint + */ + public function __construct($constraint) { } /** - * Evaluates the constraint for parameter $other. Returns true if the - * constraint is met, false otherwise. - * - * @throws \PHPUnit\Framework\Exception + * Returns the number of operands (constraints). */ - protected function matches($other): bool + public function arity(): int { } /** - * @throws \PHPUnit\Framework\Exception + * Returns a string representation of the constraint. */ - protected function getCountOf($other): ?int + public function toString(): string { } /** - * Returns the total number of iterations from a generator. - * This will fully exhaust the generator. + * Counts the number of constraint elements. */ - protected function getCountOfGenerator(\Generator $generator): int + public function count(): int { } /** @@ -7262,46 +7145,46 @@ protected function getCountOfGenerator(\Generator $generator): int * cases. This method should return the second part of that sentence. * * @param mixed $other evaluated value or object + * + * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException */ protected function failureDescription($other): string { } -} -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - */ -final class LessThan extends \PHPUnit\Framework\Constraint\Constraint -{ /** - * @param float|int $value + * Transforms string returned by the memeber constraint's toString() or + * failureDescription() such that it reflects constraint's participation in + * this expression. + * + * The method may be overwritten in a subclass to apply default + * transformation in case the operand constraint does not provide its own + * custom strings via toStringInContext() or failureDescriptionInContext(). + * + * @param string $string the string to be transformed */ - public function __construct($value) + protected function transformString(string $string): string { } /** - * Returns a string representation of the constraint. - * - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * Provides access to $this->constraint for subclasses. */ - public function toString(): string + final protected function constraint(): \PHPUnit\Framework\Constraint\Constraint + { + } + /** + * Returns true if the $constraint needs to be wrapped with parentheses. + */ + protected function constraintNeedsParentheses(\PHPUnit\Framework\Constraint\Constraint $constraint): bool { } } /** * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit */ -final class GreaterThan extends \PHPUnit\Framework\Constraint\Constraint +final class IsJson extends \PHPUnit\Framework\Constraint\Constraint { - /** - * @param float|int $value - */ - public function __construct($value) - { - } /** * Returns a string representation of the constraint. - * - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException */ public function toString(): string { @@ -7310,25 +7193,37 @@ public function toString(): string /** * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit */ -final class IsEmpty extends \PHPUnit\Framework\Constraint\Constraint +class RegularExpression extends \PHPUnit\Framework\Constraint\Constraint { + public function __construct(string $pattern) + { + } /** * Returns a string representation of the constraint. */ public function toString(): string { } + /** + * Evaluates the constraint for parameter $other. Returns true if the + * constraint is met, false otherwise. + * + * @param mixed $other value or object to evaluate + */ + protected function matches($other): bool + { + } } /** * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit */ -final class JsonMatches extends \PHPUnit\Framework\Constraint\Constraint +final class StringContains extends \PHPUnit\Framework\Constraint\Constraint { - public function __construct(string $value) + public function __construct(string $string, bool $ignoreCase = false) { } /** - * Returns a string representation of the object. + * Returns a string representation of the constraint. */ public function toString(): string { @@ -7337,8 +7232,11 @@ public function toString(): string /** * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit */ -final class IsTrue extends \PHPUnit\Framework\Constraint\Constraint +final class StringEndsWith extends \PHPUnit\Framework\Constraint\Constraint { + public function __construct(string $suffix) + { + } /** * Returns a string representation of the constraint. */ @@ -7349,12 +7247,9 @@ public function toString(): string /** * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit */ -final class IsFalse extends \PHPUnit\Framework\Constraint\Constraint +final class StringMatchesFormatDescription extends \PHPUnit\Framework\Constraint\RegularExpression { - /** - * Returns a string representation of the constraint. - */ - public function toString(): string + public function __construct(string $string) { } } @@ -7376,10 +7271,18 @@ public function toString(): string /** * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit */ -final class IsJson extends \PHPUnit\Framework\Constraint\Constraint +final class ArrayHasKey extends \PHPUnit\Framework\Constraint\Constraint { + /** + * @param int|string $key + */ + public function __construct($key) + { + } /** * Returns a string representation of the constraint. + * + * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException */ public function toString(): string { @@ -7388,59 +7291,104 @@ public function toString(): string /** * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit */ -final class StringEndsWith extends \PHPUnit\Framework\Constraint\Constraint +abstract class TraversableContains extends \PHPUnit\Framework\Constraint\Constraint { - public function __construct(string $suffix) + public function __construct($value) { } /** * Returns a string representation of the constraint. + * + * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException */ public function toString(): string { } + /** + * Returns the description of the failure. + * + * The beginning of failure messages is "Failed asserting that" in most + * cases. This method should return the second part of that sentence. + * + * @param mixed $other evaluated value or object + * + * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + */ + protected function failureDescription($other): string + { + } + protected function value() + { + } } /** * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit */ -class RegularExpression extends \PHPUnit\Framework\Constraint\Constraint +final class TraversableContainsEqual extends \PHPUnit\Framework\Constraint\TraversableContains { - public function __construct(string $pattern) +} +/** + * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit + */ +final class TraversableContainsIdentical extends \PHPUnit\Framework\Constraint\TraversableContains +{ +} +/** + * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit + */ +final class TraversableContainsOnly extends \PHPUnit\Framework\Constraint\Constraint +{ + /** + * @throws \PHPUnit\Framework\Exception + */ + public function __construct(string $type, bool $isNativeType = true) { } /** - * Returns a string representation of the constraint. + * Evaluates the constraint for parameter $other. + * + * If $returnResult is set to false (the default), an exception is thrown + * in case of a failure. null is returned otherwise. + * + * If $returnResult is true, the result of the evaluation is returned as + * a boolean value instead: true in case of success, false in case of a + * failure. + * + * @param mixed|\Traversable $other + * + * @throws \PHPUnit\Framework\ExpectationFailedException + * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException */ - public function toString(): string + public function evaluate($other, string $description = '', bool $returnResult = false): ?bool { } /** - * Evaluates the constraint for parameter $other. Returns true if the - * constraint is met, false otherwise. - * - * @param mixed $other value or object to evaluate + * Returns a string representation of the constraint. */ - protected function matches($other): bool + public function toString(): string { } } /** * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit */ -final class StringMatchesFormatDescription extends \PHPUnit\Framework\Constraint\RegularExpression +final class IsInstanceOf extends \PHPUnit\Framework\Constraint\Constraint { - public function __construct(string $string) + public function __construct(string $className) + { + } + /** + * Returns a string representation of the constraint. + */ + public function toString(): string { } } /** * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit */ -final class StringContains extends \PHPUnit\Framework\Constraint\Constraint +final class IsNull extends \PHPUnit\Framework\Constraint\Constraint { - public function __construct(string $string, bool $ignoreCase = false) - { - } /** * Returns a string representation of the constraint. */ @@ -7449,14 +7397,66 @@ public function toString(): string } } /** - * @phan-template CallbackInput of mixed - * * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit */ -final class Callback extends \PHPUnit\Framework\Constraint\Constraint +final class IsType extends \PHPUnit\Framework\Constraint\Constraint { - /** @phan-param callable(CallbackInput $input): bool $callback */ - public function __construct(callable $callback) + /** + * @var string + */ + public const TYPE_ARRAY = 'array'; + /** + * @var string + */ + public const TYPE_BOOL = 'bool'; + /** + * @var string + */ + public const TYPE_FLOAT = 'float'; + /** + * @var string + */ + public const TYPE_INT = 'int'; + /** + * @var string + */ + public const TYPE_NULL = 'null'; + /** + * @var string + */ + public const TYPE_NUMERIC = 'numeric'; + /** + * @var string + */ + public const TYPE_OBJECT = 'object'; + /** + * @var string + */ + public const TYPE_RESOURCE = 'resource'; + /** + * @var string + */ + public const TYPE_CLOSED_RESOURCE = 'resource (closed)'; + /** + * @var string + */ + public const TYPE_STRING = 'string'; + /** + * @var string + */ + public const TYPE_SCALAR = 'scalar'; + /** + * @var string + */ + public const TYPE_CALLABLE = 'callable'; + /** + * @var string + */ + public const TYPE_ITERABLE = 'iterable'; + /** + * @throws \PHPUnit\Framework\Exception + */ + public function __construct(string $type) { } /** @@ -7477,102 +7477,148 @@ final class Deprecated extends \PHPUnit\Framework\Error\Error /** * @internal */ -final class Notice extends \PHPUnit\Framework\Error\Error +class Error extends \PHPUnit\Framework\Exception { + public function __construct(string $message, int $code, string $file, int $line, ?\Exception $previous = null) + { + } } /** * @internal */ -final class Warning extends \PHPUnit\Framework\Error\Error +final class Notice extends \PHPUnit\Framework\Error\Error { } /** * @internal */ -class Error extends \PHPUnit\Framework\Exception +final class Warning extends \PHPUnit\Framework\Error\Error { - public function __construct(string $message, int $code, string $file, int $line, ?\Exception $previous = null) - { - } } namespace PHPUnit\Framework\MockObject; /** - * @internal This class is not covered by the backward compatibility promise for PHPUnit + * @internal This trait is not covered by the backward compatibility promise for PHPUnit */ -final class UnknownTypeException extends \PHPUnit\Framework\Exception implements \PHPUnit\Framework\MockObject\Exception +trait Api { - public function __construct(string $type) + /** + * @var ConfigurableMethod[] + */ + private static $__phpunit_configurableMethods; + /** + * @var object + */ + private $__phpunit_originalObject; + /** + * @var bool + */ + private $__phpunit_returnValueGeneration = true; + /** + * @var InvocationHandler + */ + private $__phpunit_invocationMocker; + /** @noinspection MagicMethodsValidityInspection */ + public static function __phpunit_initConfigurableMethods(\PHPUnit\Framework\MockObject\ConfigurableMethod ...$configurableMethods): void + { + } + /** @noinspection MagicMethodsValidityInspection */ + public function __phpunit_setOriginalObject($originalObject): void + { + } + /** @noinspection MagicMethodsValidityInspection */ + public function __phpunit_setReturnValueGeneration(bool $returnValueGeneration): void + { + } + /** @noinspection MagicMethodsValidityInspection */ + public function __phpunit_getInvocationHandler(): \PHPUnit\Framework\MockObject\InvocationHandler + { + } + /** @noinspection MagicMethodsValidityInspection */ + public function __phpunit_hasMatchers(): bool + { + } + /** @noinspection MagicMethodsValidityInspection */ + public function __phpunit_verify(bool $unsetInvocationMocker = true): void + { + } + public function expects(\PHPUnit\Framework\MockObject\Rule\InvocationOrder $matcher): \PHPUnit\Framework\MockObject\Builder\InvocationMocker { } } /** - * @internal This class is not covered by the backward compatibility promise for PHPUnit + * @internal This trait is not covered by the backward compatibility promise for PHPUnit */ -final class OriginalConstructorInvocationRequiredException extends \PHPUnit\Framework\Exception implements \PHPUnit\Framework\MockObject\Exception +trait Method { - public function __construct() + public function method(...$func_get_args) { } } /** * @internal This class is not covered by the backward compatibility promise for PHPUnit */ -final class ReturnValueNotConfiguredException extends \PHPUnit\Framework\Exception implements \PHPUnit\Framework\MockObject\Exception +final class ConfigurableMethod { - public function __construct(\PHPUnit\Framework\MockObject\Invocation $invocation) + public function __construct(string $name, \SebastianBergmann\Type\Type $returnType) + { + } + public function getName(): string + { + } + public function mayReturn($value): bool + { + } + public function getReturnTypeDeclaration(): string { } } /** * @internal This class is not covered by the backward compatibility promise for PHPUnit */ -final class RuntimeException extends \RuntimeException implements \PHPUnit\Framework\MockObject\Exception +final class BadMethodCallException extends \BadMethodCallException implements \PHPUnit\Framework\MockObject\Exception { } /** * @internal This class is not covered by the backward compatibility promise for PHPUnit */ -final class DuplicateMethodException extends \PHPUnit\Framework\Exception implements \PHPUnit\Framework\MockObject\Exception +final class CannotUseAddMethodsException extends \PHPUnit\Framework\Exception implements \PHPUnit\Framework\MockObject\Exception { - /** - * @phan-param list $methods - */ - public function __construct(array $methods) + public function __construct(string $type, string $methodName) { } } /** * @internal This class is not covered by the backward compatibility promise for PHPUnit */ -final class SoapExtensionNotAvailableException extends \PHPUnit\Framework\Exception implements \PHPUnit\Framework\MockObject\Exception +final class CannotUseOnlyMethodsException extends \PHPUnit\Framework\Exception implements \PHPUnit\Framework\MockObject\Exception { - public function __construct() + public function __construct(string $type, string $methodName) { } } /** * @internal This class is not covered by the backward compatibility promise for PHPUnit */ -final class CannotUseOnlyMethodsException extends \PHPUnit\Framework\Exception implements \PHPUnit\Framework\MockObject\Exception +final class ClassAlreadyExistsException extends \PHPUnit\Framework\Exception implements \PHPUnit\Framework\MockObject\Exception { - public function __construct(string $type, string $methodName) + public function __construct(string $className) { } } /** * @internal This class is not covered by the backward compatibility promise for PHPUnit */ -final class CannotUseAddMethodsException extends \PHPUnit\Framework\Exception implements \PHPUnit\Framework\MockObject\Exception +final class ClassIsFinalException extends \PHPUnit\Framework\Exception implements \PHPUnit\Framework\MockObject\Exception { - public function __construct(string $type, string $methodName) + public function __construct(string $className) { } } /** * @internal This class is not covered by the backward compatibility promise for PHPUnit */ -final class ClassIsFinalException extends \PHPUnit\Framework\Exception implements \PHPUnit\Framework\MockObject\Exception +final class ClassIsReadonlyException extends \PHPUnit\Framework\Exception implements \PHPUnit\Framework\MockObject\Exception { public function __construct(string $className) { @@ -7581,39 +7627,63 @@ public function __construct(string $className) /** * @internal This class is not covered by the backward compatibility promise for PHPUnit */ -final class MethodParametersAlreadyConfiguredException extends \PHPUnit\Framework\Exception implements \PHPUnit\Framework\MockObject\Exception +final class ConfigurableMethodsAlreadyInitializedException extends \PHPUnit\Framework\Exception implements \PHPUnit\Framework\MockObject\Exception { - public function __construct() +} +/** + * @internal This class is not covered by the backward compatibility promise for PHPUnit + */ +final class DuplicateMethodException extends \PHPUnit\Framework\Exception implements \PHPUnit\Framework\MockObject\Exception +{ + /** + * @phan-param list $methods + */ + public function __construct(array $methods) { } } /** * @internal This class is not covered by the backward compatibility promise for PHPUnit */ -final class UnknownClassException extends \PHPUnit\Framework\Exception implements \PHPUnit\Framework\MockObject\Exception +interface Exception extends \Throwable { - public function __construct(string $className) +} +/** + * @internal This class is not covered by the backward compatibility promise for PHPUnit + */ +final class IncompatibleReturnValueException extends \PHPUnit\Framework\Exception implements \PHPUnit\Framework\MockObject\Exception +{ + /** + * @param mixed $value + */ + public function __construct(\PHPUnit\Framework\MockObject\ConfigurableMethod $method, $value) { } } /** * @internal This class is not covered by the backward compatibility promise for PHPUnit */ -final class ConfigurableMethodsAlreadyInitializedException extends \PHPUnit\Framework\Exception implements \PHPUnit\Framework\MockObject\Exception +final class InvalidMethodNameException extends \PHPUnit\Framework\Exception implements \PHPUnit\Framework\MockObject\Exception { + public function __construct(string $method) + { + } } /** * @internal This class is not covered by the backward compatibility promise for PHPUnit */ -final class BadMethodCallException extends \BadMethodCallException implements \PHPUnit\Framework\MockObject\Exception +final class MatchBuilderNotFoundException extends \PHPUnit\Framework\Exception implements \PHPUnit\Framework\MockObject\Exception { + public function __construct(string $id) + { + } } /** * @internal This class is not covered by the backward compatibility promise for PHPUnit */ -final class ClassIsReadonlyException extends \PHPUnit\Framework\Exception implements \PHPUnit\Framework\MockObject\Exception +final class MatcherAlreadyRegisteredException extends \PHPUnit\Framework\Exception implements \PHPUnit\Framework\MockObject\Exception { - public function __construct(string $className) + public function __construct(string $id) { } } @@ -7629,16 +7699,16 @@ public function __construct(string $method) /** * @internal This class is not covered by the backward compatibility promise for PHPUnit */ -final class MatcherAlreadyRegisteredException extends \PHPUnit\Framework\Exception implements \PHPUnit\Framework\MockObject\Exception +final class MethodNameAlreadyConfiguredException extends \PHPUnit\Framework\Exception implements \PHPUnit\Framework\MockObject\Exception { - public function __construct(string $id) + public function __construct() { } } /** * @internal This class is not covered by the backward compatibility promise for PHPUnit */ -final class MethodNameAlreadyConfiguredException extends \PHPUnit\Framework\Exception implements \PHPUnit\Framework\MockObject\Exception +final class MethodNameNotConfiguredException extends \PHPUnit\Framework\Exception implements \PHPUnit\Framework\MockObject\Exception { public function __construct() { @@ -7647,16 +7717,16 @@ public function __construct() /** * @internal This class is not covered by the backward compatibility promise for PHPUnit */ -final class UnknownTraitException extends \PHPUnit\Framework\Exception implements \PHPUnit\Framework\MockObject\Exception +final class MethodParametersAlreadyConfiguredException extends \PHPUnit\Framework\Exception implements \PHPUnit\Framework\MockObject\Exception { - public function __construct(string $traitName) + public function __construct() { } } /** * @internal This class is not covered by the backward compatibility promise for PHPUnit */ -final class MethodNameNotConfiguredException extends \PHPUnit\Framework\Exception implements \PHPUnit\Framework\MockObject\Exception +final class OriginalConstructorInvocationRequiredException extends \PHPUnit\Framework\Exception implements \PHPUnit\Framework\MockObject\Exception { public function __construct() { @@ -7665,34 +7735,37 @@ public function __construct() /** * @internal This class is not covered by the backward compatibility promise for PHPUnit */ -interface Exception extends \Throwable +final class ReflectionException extends \RuntimeException implements \PHPUnit\Framework\MockObject\Exception { } /** * @internal This class is not covered by the backward compatibility promise for PHPUnit */ -final class InvalidMethodNameException extends \PHPUnit\Framework\Exception implements \PHPUnit\Framework\MockObject\Exception +final class ReturnValueNotConfiguredException extends \PHPUnit\Framework\Exception implements \PHPUnit\Framework\MockObject\Exception { - public function __construct(string $method) + public function __construct(\PHPUnit\Framework\MockObject\Invocation $invocation) { } } /** * @internal This class is not covered by the backward compatibility promise for PHPUnit */ -final class IncompatibleReturnValueException extends \PHPUnit\Framework\Exception implements \PHPUnit\Framework\MockObject\Exception +final class RuntimeException extends \RuntimeException implements \PHPUnit\Framework\MockObject\Exception { - /** - * @param mixed $value - */ - public function __construct(\PHPUnit\Framework\MockObject\ConfigurableMethod $method, $value) +} +/** + * @internal This class is not covered by the backward compatibility promise for PHPUnit + */ +final class SoapExtensionNotAvailableException extends \PHPUnit\Framework\Exception implements \PHPUnit\Framework\MockObject\Exception +{ + public function __construct() { } } /** * @internal This class is not covered by the backward compatibility promise for PHPUnit */ -final class ClassAlreadyExistsException extends \PHPUnit\Framework\Exception implements \PHPUnit\Framework\MockObject\Exception +final class UnknownClassException extends \PHPUnit\Framework\Exception implements \PHPUnit\Framework\MockObject\Exception { public function __construct(string $className) { @@ -7701,17 +7774,20 @@ public function __construct(string $className) /** * @internal This class is not covered by the backward compatibility promise for PHPUnit */ -final class MatchBuilderNotFoundException extends \PHPUnit\Framework\Exception implements \PHPUnit\Framework\MockObject\Exception +final class UnknownTraitException extends \PHPUnit\Framework\Exception implements \PHPUnit\Framework\MockObject\Exception { - public function __construct(string $id) + public function __construct(string $traitName) { } } /** * @internal This class is not covered by the backward compatibility promise for PHPUnit */ -final class ReflectionException extends \RuntimeException implements \PHPUnit\Framework\MockObject\Exception +final class UnknownTypeException extends \PHPUnit\Framework\Exception implements \PHPUnit\Framework\MockObject\Exception { + public function __construct(string $type) + { + } } /** * @internal This class is not covered by the backward compatibility promise for PHPUnit @@ -7852,14 +7928,85 @@ public function mockInterfaceMethods(string $interfaceName, bool $cloneArguments /** * @internal This class is not covered by the backward compatibility promise for PHPUnit */ -final class MethodNameConstraint extends \PHPUnit\Framework\Constraint\Constraint +final class Invocation implements \PHPUnit\Framework\SelfDescribing { - public function __construct(string $methodName) + public function __construct(string $className, string $methodName, array $parameters, string $returnType, object $object, bool $cloneObjects = false, bool $proxiedCall = false) + { + } + public function getClassName(): string + { + } + public function getMethodName(): string + { + } + public function getParameters(): array + { + } + /** + * @throws RuntimeException + * + * @return mixed Mocked return value + */ + public function generateReturnValue() { } public function toString(): string { } + public function getObject(): object + { + } +} +/** + * @internal This class is not covered by the backward compatibility promise for PHPUnit + */ +final class InvocationHandler +{ + public function __construct(array $configurableMethods, bool $returnValueGeneration) + { + } + public function hasMatchers(): bool + { + } + /** + * Looks up the match builder with identification $id and returns it. + * + * @param string $id The identification of the match builder + */ + public function lookupMatcher(string $id): ?\PHPUnit\Framework\MockObject\Matcher + { + } + /** + * Registers a matcher with the identification $id. The matcher can later be + * looked up using lookupMatcher() to figure out if it has been invoked. + * + * @param string $id The identification of the matcher + * @param Matcher $matcher The builder which is being registered + * + * @throws MatcherAlreadyRegisteredException + */ + public function registerMatcher(string $id, \PHPUnit\Framework\MockObject\Matcher $matcher): void + { + } + public function expects(\PHPUnit\Framework\MockObject\Rule\InvocationOrder $rule): \PHPUnit\Framework\MockObject\Builder\InvocationMocker + { + } + /** + * @throws \Exception + * @throws RuntimeException + */ + public function invoke(\PHPUnit\Framework\MockObject\Invocation $invocation) + { + } + public function matches(\PHPUnit\Framework\MockObject\Invocation $invocation): bool + { + } + /** + * @throws \Throwable + */ + public function verify(): void + { + } } /** * @internal This class is not covered by the backward compatibility promise for PHPUnit @@ -7927,63 +8074,15 @@ public function toString(): string /** * @internal This class is not covered by the backward compatibility promise for PHPUnit */ -final class ConfigurableMethod -{ - public function __construct(string $name, \SebastianBergmann\Type\Type $returnType) - { - } - public function getName(): string - { - } - public function mayReturn($value): bool - { - } - public function getReturnTypeDeclaration(): string - { - } -} -/** - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final class MockMethod +final class MethodNameConstraint extends \PHPUnit\Framework\Constraint\Constraint { - /** - * @throws ReflectionException - * @throws RuntimeException - */ - public static function fromReflection(\ReflectionMethod $method, bool $callOriginalMethod, bool $cloneArguments): self - { - } - public static function fromName(string $fullClassName, string $methodName, bool $cloneArguments): self - { - } - public function __construct(string $className, string $methodName, bool $cloneArguments, string $modifier, string $argumentsForDeclaration, string $argumentsForCall, \SebastianBergmann\Type\Type $returnType, string $reference, bool $callOriginalMethod, bool $static, ?string $deprecation) - { - } - public function getName(): string - { - } - /** - * @throws RuntimeException - */ - public function generateCode(): string + public function __construct(string $methodName) { } - public function getReturnType(): \SebastianBergmann\Type\Type + public function toString(): string { } } -/** - * @method Builder\InvocationStubber method($constraint) - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - */ -interface Stub -{ - public function __phpunit_getInvocationHandler(): \PHPUnit\Framework\MockObject\InvocationHandler; - public function __phpunit_hasMatchers(): bool; - public function __phpunit_setReturnValueGeneration(bool $returnValueGeneration): void; -} /** * @phan-template MockedType * @@ -8241,125 +8340,52 @@ public function disableAutoReturnValueGeneration(): self /** * @internal This class is not covered by the backward compatibility promise for PHPUnit */ -final class Invocation implements \PHPUnit\Framework\SelfDescribing +final class MockClass implements \PHPUnit\Framework\MockObject\MockType { - public function __construct(string $className, string $methodName, array $parameters, string $returnType, object $object, bool $cloneObjects = false, bool $proxiedCall = false) - { - } - public function getClassName(): string - { - } - public function getMethodName(): string - { - } - public function getParameters(): array - { - } /** - * @throws RuntimeException - * - * @return mixed Mocked return value + * @phan-param class-string $mockName */ - public function generateReturnValue() + public function __construct(string $classCode, string $mockName, array $configurableMethods) { } - public function toString(): string + /** + * @phan-return class-string + */ + public function generate(): string { } - public function getObject(): object + public function getClassCode(): string { } } /** * @internal This class is not covered by the backward compatibility promise for PHPUnit */ -interface MockType -{ - /** - * @phan-return class-string - */ - public function generate(): string; -} -/** - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final class InvocationHandler +final class MockMethod { - public function __construct(array $configurableMethods, bool $returnValueGeneration) - { - } - public function hasMatchers(): bool - { - } - /** - * Looks up the match builder with identification $id and returns it. - * - * @param string $id The identification of the match builder - */ - public function lookupMatcher(string $id): ?\PHPUnit\Framework\MockObject\Matcher - { - } - /** - * Registers a matcher with the identification $id. The matcher can later be - * looked up using lookupMatcher() to figure out if it has been invoked. - * - * @param string $id The identification of the matcher - * @param Matcher $matcher The builder which is being registered - * - * @throws MatcherAlreadyRegisteredException - */ - public function registerMatcher(string $id, \PHPUnit\Framework\MockObject\Matcher $matcher): void - { - } - public function expects(\PHPUnit\Framework\MockObject\Rule\InvocationOrder $rule): \PHPUnit\Framework\MockObject\Builder\InvocationMocker - { - } /** - * @throws \Exception + * @throws ReflectionException * @throws RuntimeException */ - public function invoke(\PHPUnit\Framework\MockObject\Invocation $invocation) + public static function fromReflection(\ReflectionMethod $method, bool $callOriginalMethod, bool $cloneArguments): self { } - public function matches(\PHPUnit\Framework\MockObject\Invocation $invocation): bool + public static function fromName(string $fullClassName, string $methodName, bool $cloneArguments): self { } - /** - * @throws \Throwable - */ - public function verify(): void + public function __construct(string $className, string $methodName, bool $cloneArguments, string $modifier, string $argumentsForDeclaration, string $argumentsForCall, \SebastianBergmann\Type\Type $returnType, string $reference, bool $callOriginalMethod, bool $static, ?string $deprecation) { } -} -/** - * @method Builder\InvocationMocker method($constraint) - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - */ -interface MockObject extends \PHPUnit\Framework\MockObject\Stub -{ - public function __phpunit_setOriginalObject($originalObject): void; - public function __phpunit_verify(bool $unsetInvocationMocker = true): void; - public function expects(\PHPUnit\Framework\MockObject\Rule\InvocationOrder $invocationRule): \PHPUnit\Framework\MockObject\Builder\InvocationMocker; -} -/** - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final class MockTrait implements \PHPUnit\Framework\MockObject\MockType -{ - /** - * @phan-param class-string $mockName - */ - public function __construct(string $classCode, string $mockName) + public function getName(): string { } /** - * @phan-return class-string + * @throws RuntimeException */ - public function generate(): string + public function generateCode(): string { } - public function getClassCode(): string + public function getReturnType(): \SebastianBergmann\Type\Type { } } @@ -8382,27 +8408,25 @@ public function hasMethod(string $methodName): bool } } /** - * @internal This class is not covered by the backward compatibility promise for PHPUnit + * @method Builder\InvocationMocker method($constraint) + * + * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit */ -interface Verifiable +interface MockObject extends \PHPUnit\Framework\MockObject\Stub { - /** - * Verifies that the current expectation is valid. If everything is OK the - * code should just return, if not it must throw an exception. - * - * @throws \PHPUnit\Framework\ExpectationFailedException - */ - public function verify(): void; + public function __phpunit_setOriginalObject($originalObject): void; + public function __phpunit_verify(bool $unsetInvocationMocker = true): void; + public function expects(\PHPUnit\Framework\MockObject\Rule\InvocationOrder $invocationRule): \PHPUnit\Framework\MockObject\Builder\InvocationMocker; } /** * @internal This class is not covered by the backward compatibility promise for PHPUnit */ -final class MockClass implements \PHPUnit\Framework\MockObject\MockType +final class MockTrait implements \PHPUnit\Framework\MockObject\MockType { /** * @phan-param class-string $mockName */ - public function __construct(string $classCode, string $mockName, array $configurableMethods) + public function __construct(string $classCode, string $mockName) { } /** @@ -8416,79 +8440,54 @@ public function getClassCode(): string } } /** - * @internal This trait is not covered by the backward compatibility promise for PHPUnit + * @internal This class is not covered by the backward compatibility promise for PHPUnit */ -trait Api +interface MockType { /** - * @var ConfigurableMethod[] - */ - private static $__phpunit_configurableMethods; - /** - * @var object - */ - private $__phpunit_originalObject; - /** - * @var bool - */ - private $__phpunit_returnValueGeneration = true; - /** - * @var InvocationHandler + * @phan-return class-string */ - private $__phpunit_invocationMocker; - /** @noinspection MagicMethodsValidityInspection */ - public static function __phpunit_initConfigurableMethods(\PHPUnit\Framework\MockObject\ConfigurableMethod ...$configurableMethods): void - { - } - /** @noinspection MagicMethodsValidityInspection */ - public function __phpunit_setOriginalObject($originalObject): void - { - } - /** @noinspection MagicMethodsValidityInspection */ - public function __phpunit_setReturnValueGeneration(bool $returnValueGeneration): void - { - } - /** @noinspection MagicMethodsValidityInspection */ - public function __phpunit_getInvocationHandler(): \PHPUnit\Framework\MockObject\InvocationHandler - { - } - /** @noinspection MagicMethodsValidityInspection */ - public function __phpunit_hasMatchers(): bool - { - } - /** @noinspection MagicMethodsValidityInspection */ - public function __phpunit_verify(bool $unsetInvocationMocker = true): void - { - } - public function expects(\PHPUnit\Framework\MockObject\Rule\InvocationOrder $matcher): \PHPUnit\Framework\MockObject\Builder\InvocationMocker - { - } + public function generate(): string; } /** - * @internal This trait is not covered by the backward compatibility promise for PHPUnit + * @method Builder\InvocationStubber method($constraint) + * + * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit */ -trait Method +interface Stub { - public function method(...$func_get_args) - { - } + public function __phpunit_getInvocationHandler(): \PHPUnit\Framework\MockObject\InvocationHandler; + public function __phpunit_hasMatchers(): bool; + public function __phpunit_setReturnValueGeneration(bool $returnValueGeneration): void; +} +/** + * @internal This class is not covered by the backward compatibility promise for PHPUnit + */ +interface Verifiable +{ + /** + * Verifies that the current expectation is valid. If everything is OK the + * code should just return, if not it must throw an exception. + * + * @throws \PHPUnit\Framework\ExpectationFailedException + */ + public function verify(): void; } namespace PHPUnit\Framework\MockObject\Builder; /** * @internal This class is not covered by the backward compatibility promise for PHPUnit */ -interface MethodNameMatch extends \PHPUnit\Framework\MockObject\Builder\ParametersMatch +interface Identity { /** - * Adds a new method name match and returns the parameter match object for - * further matching possibilities. + * Sets the identification of the expectation to $id. * - * @param \PHPUnit\Framework\Constraint\Constraint $constraint Constraint for matching method, if a string is passed it will use the PHPUnit_Framework_Constraint_IsEqual + * @note The identifier is unique per mock object. * - * @return ParametersMatch + * @param string $id unique identification of expectation */ - public function method($constraint); + public function id($id); } /** * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit @@ -8642,27 +8641,17 @@ public function willThrowException(\Throwable $exception); /** * @internal This class is not covered by the backward compatibility promise for PHPUnit */ -interface Stub extends \PHPUnit\Framework\MockObject\Builder\Identity -{ - /** - * Stubs the matching method with the stub object $stub. Any invocations of - * the matched method will now be handled by the stub instead. - */ - public function will(\PHPUnit\Framework\MockObject\Stub\Stub $stub): \PHPUnit\Framework\MockObject\Builder\Identity; -} -/** - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -interface Identity +interface MethodNameMatch extends \PHPUnit\Framework\MockObject\Builder\ParametersMatch { /** - * Sets the identification of the expectation to $id. + * Adds a new method name match and returns the parameter match object for + * further matching possibilities. * - * @note The identifier is unique per mock object. + * @param \PHPUnit\Framework\Constraint\Constraint $constraint Constraint for matching method, if a string is passed it will use the PHPUnit_Framework_Constraint_IsEqual * - * @param string $id unique identification of expectation + * @return ParametersMatch */ - public function id($id); + public function method($constraint); } /** * @internal This class is not covered by the backward compatibility promise for PHPUnit @@ -8709,66 +8698,31 @@ public function with(...$arguments); */ public function withAnyParameters(); } -namespace PHPUnit\Framework\MockObject\Rule; - /** * @internal This class is not covered by the backward compatibility promise for PHPUnit */ -final class InvokedCount extends \PHPUnit\Framework\MockObject\Rule\InvocationOrder +interface Stub extends \PHPUnit\Framework\MockObject\Builder\Identity { /** - * @param int $expectedCount - */ - public function __construct($expectedCount) - { - } - public function isNever(): bool - { - } - public function toString(): string - { - } - public function matches(\PHPUnit\Framework\MockObject\Invocation $invocation): bool - { - } - /** - * Verifies that the current expectation is valid. If everything is OK the - * code should just return, if not it must throw an exception. - * - * @throws \PHPUnit\Framework\ExpectationFailedException + * Stubs the matching method with the stub object $stub. Any invocations of + * the matched method will now be handled by the stub instead. */ - public function verify(): void - { - } + public function will(\PHPUnit\Framework\MockObject\Stub\Stub $stub): \PHPUnit\Framework\MockObject\Builder\Identity; } +namespace PHPUnit\Framework\MockObject\Rule; + /** * @internal This class is not covered by the backward compatibility promise for PHPUnit - * - * @deprecated https://github.com/sebastianbergmann/phpunit/issues/4297 - * - * @codeCoverageIgnore */ -final class InvokedAtIndex extends \PHPUnit\Framework\MockObject\Rule\InvocationOrder +final class AnyInvokedCount extends \PHPUnit\Framework\MockObject\Rule\InvocationOrder { - /** - * @param int $sequenceIndex - */ - public function __construct($sequenceIndex) - { - } public function toString(): string { } - public function matches(\PHPUnit\Framework\MockObject\Invocation $invocation): bool + public function verify(): void { } - /** - * Verifies that the current expectation is valid. If everything is OK the - * code should just return, if not it must throw an exception. - * - * @throws \PHPUnit\Framework\ExpectationFailedException - */ - public function verify(): void + public function matches(\PHPUnit\Framework\MockObject\Invocation $invocation): bool { } } @@ -8789,29 +8743,28 @@ public function verify(): void } /** * @internal This class is not covered by the backward compatibility promise for PHPUnit + * + * @deprecated */ -final class Parameters implements \PHPUnit\Framework\MockObject\Rule\ParametersRule +final class ConsecutiveParameters implements \PHPUnit\Framework\MockObject\Rule\ParametersRule { /** * @throws \PHPUnit\Framework\Exception */ - public function __construct(array $parameters) + public function __construct(array $parameterGroups) { } public function toString(): string { } /** - * @throws \Exception + * @throws \PHPUnit\Framework\ExpectationFailedException + * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException */ public function apply(\PHPUnit\Framework\MockObject\Invocation $invocation): void { } /** - * Checks if the invocation $invocation matches the current rules. If it - * does the rule will get the invoked() method called which should check - * if an expectation is met. - * * @throws \PHPUnit\Framework\ExpectationFailedException * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException */ @@ -8819,17 +8772,6 @@ public function verify(): void { } } -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - */ -interface ParametersRule extends \PHPUnit\Framework\SelfDescribing, \PHPUnit\Framework\MockObject\Verifiable -{ - /** - * @throws \PHPUnit\Framework\ExpectationFailedException if the invocation violates the rule - */ - public function apply(\PHPUnit\Framework\MockObject\Invocation $invocation): void; - public function verify(): void; -} /** * @internal This class is not covered by the backward compatibility promise for PHPUnit */ @@ -8849,12 +8791,25 @@ abstract protected function invokedDo(\PHPUnit\Framework\MockObject\Invocation $ } /** * @internal This class is not covered by the backward compatibility promise for PHPUnit + * + * @deprecated https://github.com/sebastianbergmann/phpunit/issues/4297 + * + * @codeCoverageIgnore */ -final class InvokedAtLeastOnce extends \PHPUnit\Framework\MockObject\Rule\InvocationOrder +final class InvokedAtIndex extends \PHPUnit\Framework\MockObject\Rule\InvocationOrder { + /** + * @param int $sequenceIndex + */ + public function __construct($sequenceIndex) + { + } public function toString(): string { } + public function matches(\PHPUnit\Framework\MockObject\Invocation $invocation): bool + { + } /** * Verifies that the current expectation is valid. If everything is OK the * code should just return, if not it must throw an exception. @@ -8864,9 +8819,6 @@ public function toString(): string public function verify(): void { } - public function matches(\PHPUnit\Framework\MockObject\Invocation $invocation): bool - { - } } /** * @internal This class is not covered by the backward compatibility promise for PHPUnit @@ -8898,11 +8850,17 @@ public function matches(\PHPUnit\Framework\MockObject\Invocation $invocation): b /** * @internal This class is not covered by the backward compatibility promise for PHPUnit */ -final class AnyInvokedCount extends \PHPUnit\Framework\MockObject\Rule\InvocationOrder +final class InvokedAtLeastOnce extends \PHPUnit\Framework\MockObject\Rule\InvocationOrder { public function toString(): string { } + /** + * Verifies that the current expectation is valid. If everything is OK the + * code should just return, if not it must throw an exception. + * + * @throws \PHPUnit\Framework\ExpectationFailedException + */ public function verify(): void { } @@ -8913,85 +8871,116 @@ public function matches(\PHPUnit\Framework\MockObject\Invocation $invocation): b /** * @internal This class is not covered by the backward compatibility promise for PHPUnit */ -final class MethodName +final class InvokedAtMostCount extends \PHPUnit\Framework\MockObject\Rule\InvocationOrder { /** - * @param \PHPUnit\Framework\Constraint\Constraint|string $constraint - * - * @throws \PHPUnit\Framework\InvalidArgumentException + * @param int $allowedInvocations */ - public function __construct($constraint) + public function __construct($allowedInvocations) { } public function toString(): string { } /** - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * Verifies that the current expectation is valid. If everything is OK the + * code should just return, if not it must throw an exception. + * * @throws \PHPUnit\Framework\ExpectationFailedException */ + public function verify(): void + { + } + public function matches(\PHPUnit\Framework\MockObject\Invocation $invocation): bool + { + } +} +/** + * @internal This class is not covered by the backward compatibility promise for PHPUnit + */ +final class InvokedCount extends \PHPUnit\Framework\MockObject\Rule\InvocationOrder +{ + /** + * @param int $expectedCount + */ + public function __construct($expectedCount) + { + } + public function isNever(): bool + { + } + public function toString(): string + { + } public function matches(\PHPUnit\Framework\MockObject\Invocation $invocation): bool { } /** - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * Verifies that the current expectation is valid. If everything is OK the + * code should just return, if not it must throw an exception. + * * @throws \PHPUnit\Framework\ExpectationFailedException */ - public function matchesName(string $methodName): bool + public function verify(): void { } } /** * @internal This class is not covered by the backward compatibility promise for PHPUnit */ -final class InvokedAtMostCount extends \PHPUnit\Framework\MockObject\Rule\InvocationOrder +final class MethodName { /** - * @param int $allowedInvocations + * @param \PHPUnit\Framework\Constraint\Constraint|string $constraint + * + * @throws \PHPUnit\Framework\InvalidArgumentException */ - public function __construct($allowedInvocations) + public function __construct($constraint) { } public function toString(): string { } /** - * Verifies that the current expectation is valid. If everything is OK the - * code should just return, if not it must throw an exception. - * + * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException * @throws \PHPUnit\Framework\ExpectationFailedException */ - public function verify(): void + public function matches(\PHPUnit\Framework\MockObject\Invocation $invocation): bool { } - public function matches(\PHPUnit\Framework\MockObject\Invocation $invocation): bool + /** + * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * @throws \PHPUnit\Framework\ExpectationFailedException + */ + public function matchesName(string $methodName): bool { } } /** * @internal This class is not covered by the backward compatibility promise for PHPUnit - * - * @deprecated */ -final class ConsecutiveParameters implements \PHPUnit\Framework\MockObject\Rule\ParametersRule +final class Parameters implements \PHPUnit\Framework\MockObject\Rule\ParametersRule { /** * @throws \PHPUnit\Framework\Exception */ - public function __construct(array $parameterGroups) + public function __construct(array $parameters) { } public function toString(): string { } /** - * @throws \PHPUnit\Framework\ExpectationFailedException - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * @throws \Exception */ public function apply(\PHPUnit\Framework\MockObject\Invocation $invocation): void { } /** + * Checks if the invocation $invocation matches the current rules. If it + * does the rule will get the invoked() method called which should check + * if an expectation is met. + * * @throws \PHPUnit\Framework\ExpectationFailedException * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException */ @@ -8999,27 +8988,25 @@ public function verify(): void { } } -namespace PHPUnit\Framework\MockObject\Stub; - /** - * @internal This class is not covered by the backward compatibility promise for PHPUnit + * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit */ -interface Stub extends \PHPUnit\Framework\SelfDescribing +interface ParametersRule extends \PHPUnit\Framework\SelfDescribing, \PHPUnit\Framework\MockObject\Verifiable { /** - * Fakes the processing of the invocation $invocation by returning a - * specific value. - * - * @param \PHPUnit\Framework\MockObject\Invocation $invocation The invocation which was mocked and matched by the current method and argument matchers + * @throws \PHPUnit\Framework\ExpectationFailedException if the invocation violates the rule */ - public function invoke(\PHPUnit\Framework\MockObject\Invocation $invocation); + public function apply(\PHPUnit\Framework\MockObject\Invocation $invocation): void; + public function verify(): void; } +namespace PHPUnit\Framework\MockObject\Stub; + /** * @internal This class is not covered by the backward compatibility promise for PHPUnit */ -final class ReturnCallback implements \PHPUnit\Framework\MockObject\Stub\Stub +final class ConsecutiveCalls implements \PHPUnit\Framework\MockObject\Stub\Stub { - public function __construct($callback) + public function __construct(array $stack) { } public function invoke(\PHPUnit\Framework\MockObject\Invocation $invocation) @@ -9032,12 +9019,15 @@ public function toString(): string /** * @internal This class is not covered by the backward compatibility promise for PHPUnit */ -final class ReturnArgument implements \PHPUnit\Framework\MockObject\Stub\Stub +final class Exception implements \PHPUnit\Framework\MockObject\Stub\Stub { - public function __construct($argumentIndex) + public function __construct(\Throwable $exception) { } - public function invoke(\PHPUnit\Framework\MockObject\Invocation $invocation) + /** + * @throws \Throwable + */ + public function invoke(\PHPUnit\Framework\MockObject\Invocation $invocation): void { } public function toString(): string @@ -9047,9 +9037,9 @@ public function toString(): string /** * @internal This class is not covered by the backward compatibility promise for PHPUnit */ -final class ReturnStub implements \PHPUnit\Framework\MockObject\Stub\Stub +final class ReturnArgument implements \PHPUnit\Framework\MockObject\Stub\Stub { - public function __construct($value) + public function __construct($argumentIndex) { } public function invoke(\PHPUnit\Framework\MockObject\Invocation $invocation) @@ -9062,15 +9052,12 @@ public function toString(): string /** * @internal This class is not covered by the backward compatibility promise for PHPUnit */ -final class Exception implements \PHPUnit\Framework\MockObject\Stub\Stub +final class ReturnCallback implements \PHPUnit\Framework\MockObject\Stub\Stub { - public function __construct(\Throwable $exception) + public function __construct($callback) { } - /** - * @throws \Throwable - */ - public function invoke(\PHPUnit\Framework\MockObject\Invocation $invocation): void + public function invoke(\PHPUnit\Framework\MockObject\Invocation $invocation) { } public function toString(): string @@ -9080,9 +9067,9 @@ public function toString(): string /** * @internal This class is not covered by the backward compatibility promise for PHPUnit */ -final class ConsecutiveCalls implements \PHPUnit\Framework\MockObject\Stub\Stub +final class ReturnReference implements \PHPUnit\Framework\MockObject\Stub\Stub { - public function __construct(array $stack) + public function __construct(&$reference) { } public function invoke(\PHPUnit\Framework\MockObject\Invocation $invocation) @@ -9095,11 +9082,11 @@ public function toString(): string /** * @internal This class is not covered by the backward compatibility promise for PHPUnit */ -final class ReturnValueMap implements \PHPUnit\Framework\MockObject\Stub\Stub +final class ReturnSelf implements \PHPUnit\Framework\MockObject\Stub\Stub { - public function __construct(array $valueMap) - { - } + /** + * @throws \PHPUnit\Framework\MockObject\RuntimeException + */ public function invoke(\PHPUnit\Framework\MockObject\Invocation $invocation) { } @@ -9110,11 +9097,11 @@ public function toString(): string /** * @internal This class is not covered by the backward compatibility promise for PHPUnit */ -final class ReturnSelf implements \PHPUnit\Framework\MockObject\Stub\Stub +final class ReturnStub implements \PHPUnit\Framework\MockObject\Stub\Stub { - /** - * @throws \PHPUnit\Framework\MockObject\RuntimeException - */ + public function __construct($value) + { + } public function invoke(\PHPUnit\Framework\MockObject\Invocation $invocation) { } @@ -9125,9 +9112,9 @@ public function toString(): string /** * @internal This class is not covered by the backward compatibility promise for PHPUnit */ -final class ReturnReference implements \PHPUnit\Framework\MockObject\Stub\Stub +final class ReturnValueMap implements \PHPUnit\Framework\MockObject\Stub\Stub { - public function __construct(&$reference) + public function __construct(array $valueMap) { } public function invoke(\PHPUnit\Framework\MockObject\Invocation $invocation) @@ -9137,86 +9124,134 @@ public function toString(): string { } } +/** + * @internal This class is not covered by the backward compatibility promise for PHPUnit + */ +interface Stub extends \PHPUnit\Framework\SelfDescribing +{ + /** + * Fakes the processing of the invocation $invocation by returning a + * specific value. + * + * @param \PHPUnit\Framework\MockObject\Invocation $invocation The invocation which was mocked and matched by the current method and argument matchers + */ + public function invoke(\PHPUnit\Framework\MockObject\Invocation $invocation); +} namespace PHPUnit\Runner; /** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit + * @internal This class is not covered by the backward compatibility promise for PHPUnit */ -final class Version +abstract class BaseTestRunner { /** - * Returns the current version of PHPUnit. + * @var int + */ + public const STATUS_UNKNOWN = -1; + /** + * @var int + */ + public const STATUS_PASSED = 0; + /** + * @var int + */ + public const STATUS_SKIPPED = 1; + /** + * @var int + */ + public const STATUS_INCOMPLETE = 2; + /** + * @var int + */ + public const STATUS_FAILURE = 3; + /** + * @var int + */ + public const STATUS_ERROR = 4; + /** + * @var int + */ + public const STATUS_RISKY = 5; + /** + * @var int + */ + public const STATUS_WARNING = 6; + /** + * @var string + */ + public const SUITE_METHODNAME = 'suite'; + /** + * Returns the loader to be used. + */ + public function getLoader(): \PHPUnit\Runner\TestSuiteLoader + { + } + /** + * Returns the Test corresponding to the given suite. + * This is a template method, subclasses override + * the runFailed() and clearStatus() methods. * - * @phan-return non-empty-string + * @param string|string[] $suffixes + * + * @throws \PHPUnit\Framework\Exception */ - public static function id(): string + public function getTest(string $suiteClassFile, $suffixes = ''): ?\PHPUnit\Framework\TestSuite { } /** - * @phan-return non-empty-string + * Returns the loaded ReflectionClass for a suite name. */ - public static function series(): string + protected function loadSuiteClass(string $suiteClassFile): \ReflectionClass { } /** - * @phan-return non-empty-string + * Clears the status message. */ - public static function getVersionString(): string + protected function clearStatus(): void { } -} -/** - * This interface, as well as the associated mechanism for extending PHPUnit, - * will be removed in PHPUnit 10. There is no alternative available in this - * version of PHPUnit. - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @see https://github.com/sebastianbergmann/phpunit/issues/4676 - */ -interface AfterIncompleteTestHook extends \PHPUnit\Runner\TestHook -{ - public function executeAfterIncompleteTest(string $test, string $message, float $time): void; + /** + * Override to define how to handle a failed loading of + * a test suite. + */ + abstract protected function runFailed(string $message): void; } /** * @internal This class is not covered by the backward compatibility promise for PHPUnit */ -final class TestListenerAdapter implements \PHPUnit\Framework\TestListener +final class DefaultTestResultCache implements \PHPUnit\Runner\TestResultCache { - public function add(\PHPUnit\Runner\TestHook $hook): void - { - } - public function startTest(\PHPUnit\Framework\Test $test): void - { - } - public function addError(\PHPUnit\Framework\Test $test, \Throwable $t, float $time): void - { - } - public function addWarning(\PHPUnit\Framework\Test $test, \PHPUnit\Framework\Warning $e, float $time): void - { - } - public function addFailure(\PHPUnit\Framework\Test $test, \PHPUnit\Framework\AssertionFailedError $e, float $time): void + public function __construct(?string $filepath = null) { } - public function addIncompleteTest(\PHPUnit\Framework\Test $test, \Throwable $t, float $time): void + public function setState(string $testName, int $state): void { } - public function addRiskyTest(\PHPUnit\Framework\Test $test, \Throwable $t, float $time): void + public function getState(string $testName): int { } - public function addSkippedTest(\PHPUnit\Framework\Test $test, \Throwable $t, float $time): void + public function setTime(string $testName, float $time): void { } - public function endTest(\PHPUnit\Framework\Test $test, float $time): void + public function getTime(string $testName): float { } - public function startTestSuite(\PHPUnit\Framework\TestSuite $suite): void + public function load(): void { } - public function endTestSuite(\PHPUnit\Framework\TestSuite $suite): void + /** + * @throws Exception + */ + public function persist(): void { } } +/** + * @internal This class is not covered by the backward compatibility promise for PHPUnit + */ +final class Exception extends \RuntimeException implements \PHPUnit\Exception +{ +} /** * This interface, as well as the associated mechanism for extending PHPUnit, * will be removed in PHPUnit 10. There is no alternative available in this @@ -9226,9 +9261,9 @@ public function endTestSuite(\PHPUnit\Framework\TestSuite $suite): void * * @see https://github.com/sebastianbergmann/phpunit/issues/4676 */ -interface AfterLastTestHook extends \PHPUnit\Runner\Hook +interface AfterIncompleteTestHook extends \PHPUnit\Runner\TestHook { - public function executeAfterLastTest(): void; + public function executeAfterIncompleteTest(string $test, string $message, float $time): void; } /** * This interface, as well as the associated mechanism for extending PHPUnit, @@ -9239,9 +9274,9 @@ public function executeAfterLastTest(): void; * * @see https://github.com/sebastianbergmann/phpunit/issues/4676 */ -interface AfterSuccessfulTestHook extends \PHPUnit\Runner\TestHook +interface AfterLastTestHook extends \PHPUnit\Runner\Hook { - public function executeAfterSuccessfulTest(string $test, float $time): void; + public function executeAfterLastTest(): void; } /** * This interface, as well as the associated mechanism for extending PHPUnit, @@ -9252,9 +9287,9 @@ public function executeAfterSuccessfulTest(string $test, float $time): void; * * @see https://github.com/sebastianbergmann/phpunit/issues/4676 */ -interface BeforeFirstTestHook extends \PHPUnit\Runner\Hook +interface AfterRiskyTestHook extends \PHPUnit\Runner\TestHook { - public function executeBeforeFirstTest(): void; + public function executeAfterRiskyTest(string $test, string $message, float $time): void; } /** * This interface, as well as the associated mechanism for extending PHPUnit, @@ -9278,9 +9313,22 @@ public function executeAfterSkippedTest(string $test, string $message, float $ti * * @see https://github.com/sebastianbergmann/phpunit/issues/4676 */ -interface AfterTestWarningHook extends \PHPUnit\Runner\TestHook +interface AfterSuccessfulTestHook extends \PHPUnit\Runner\TestHook { - public function executeAfterTestWarning(string $test, string $message, float $time): void; + public function executeAfterSuccessfulTest(string $test, float $time): void; +} +/** + * This interface, as well as the associated mechanism for extending PHPUnit, + * will be removed in PHPUnit 10. There is no alternative available in this + * version of PHPUnit. + * + * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit + * + * @see https://github.com/sebastianbergmann/phpunit/issues/4676 + */ +interface AfterTestErrorHook extends \PHPUnit\Runner\TestHook +{ + public function executeAfterTestError(string $test, string $message, float $time): void; } /** * This interface, as well as the associated mechanism for extending PHPUnit, @@ -9291,9 +9339,9 @@ public function executeAfterTestWarning(string $test, string $message, float $ti * * @see https://github.com/sebastianbergmann/phpunit/issues/4676 */ -interface AfterRiskyTestHook extends \PHPUnit\Runner\TestHook +interface AfterTestFailureHook extends \PHPUnit\Runner\TestHook { - public function executeAfterRiskyTest(string $test, string $message, float $time): void; + public function executeAfterTestFailure(string $test, string $message, float $time): void; } /** * This interface, as well as the associated mechanism for extending PHPUnit, @@ -9304,9 +9352,15 @@ public function executeAfterRiskyTest(string $test, string $message, float $time * * @see https://github.com/sebastianbergmann/phpunit/issues/4676 */ -interface AfterTestErrorHook extends \PHPUnit\Runner\TestHook +interface AfterTestHook extends \PHPUnit\Runner\TestHook { - public function executeAfterTestError(string $test, string $message, float $time): void; + /** + * This hook will fire after any test, regardless of the result. + * + * For more fine grained control, have a look at the other hooks + * that extend PHPUnit\Runner\Hook. + */ + public function executeAfterTest(string $test, float $time): void; } /** * This interface, as well as the associated mechanism for extending PHPUnit, @@ -9317,8 +9371,9 @@ public function executeAfterTestError(string $test, string $message, float $time * * @see https://github.com/sebastianbergmann/phpunit/issues/4676 */ -interface TestHook extends \PHPUnit\Runner\Hook +interface AfterTestWarningHook extends \PHPUnit\Runner\TestHook { + public function executeAfterTestWarning(string $test, string $message, float $time): void; } /** * This interface, as well as the associated mechanism for extending PHPUnit, @@ -9329,15 +9384,9 @@ interface TestHook extends \PHPUnit\Runner\Hook * * @see https://github.com/sebastianbergmann/phpunit/issues/4676 */ -interface AfterTestHook extends \PHPUnit\Runner\TestHook +interface BeforeFirstTestHook extends \PHPUnit\Runner\Hook { - /** - * This hook will fire after any test, regardless of the result. - * - * For more fine grained control, have a look at the other hooks - * that extend PHPUnit\Runner\Hook. - */ - public function executeAfterTest(string $test, float $time): void; + public function executeBeforeFirstTest(): void; } /** * This interface, as well as the associated mechanism for extending PHPUnit, @@ -9361,9 +9410,8 @@ public function executeBeforeTest(string $test): void; * * @see https://github.com/sebastianbergmann/phpunit/issues/4676 */ -interface AfterTestFailureHook extends \PHPUnit\Runner\TestHook +interface Hook { - public function executeAfterTestFailure(string $test, string $message, float $time): void; } /** * This interface, as well as the associated mechanism for extending PHPUnit, @@ -9374,267 +9422,175 @@ public function executeAfterTestFailure(string $test, string $message, float $ti * * @see https://github.com/sebastianbergmann/phpunit/issues/4676 */ -interface Hook +interface TestHook extends \PHPUnit\Runner\Hook { } /** * @internal This class is not covered by the backward compatibility promise for PHPUnit */ -final class PhptTestCase implements \PHPUnit\Framework\Reorderable, \PHPUnit\Framework\SelfDescribing, \PHPUnit\Framework\Test +final class TestListenerAdapter implements \PHPUnit\Framework\TestListener { - /** - * Constructs a test case with the given filename. - * - * @throws Exception - */ - public function __construct(string $filename, ?\PHPUnit\Util\PHP\AbstractPhpProcess $phpUtil = null) - { - } - /** - * Counts the number of test cases executed by run(TestResult result). - */ - public function count(): int - { - } - /** - * Runs a test and collects its result in a TestResult instance. - * - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * @throws Exception - * @throws \SebastianBergmann\CodeCoverage\InvalidArgumentException - * @throws \SebastianBergmann\CodeCoverage\UnintentionallyCoveredCodeException - */ - public function run(?\PHPUnit\Framework\TestResult $result = null): \PHPUnit\Framework\TestResult - { - } - /** - * Returns the name of the test case. - */ - public function getName(): string - { - } - /** - * Returns a string representation of the test case. - */ - public function toString(): string - { - } - public function usesDataProvider(): bool + public function add(\PHPUnit\Runner\TestHook $hook): void { } - public function getNumAssertions(): int + public function startTest(\PHPUnit\Framework\Test $test): void { } - public function getActualOutput(): string + public function addError(\PHPUnit\Framework\Test $test, \Throwable $t, float $time): void { } - public function hasOutput(): bool + public function addWarning(\PHPUnit\Framework\Test $test, \PHPUnit\Framework\Warning $e, float $time): void { } - public function sortId(): string + public function addFailure(\PHPUnit\Framework\Test $test, \PHPUnit\Framework\AssertionFailedError $e, float $time): void { } - /** - * @return list<\PHPUnit\Framework\ExecutionOrderDependency> - */ - public function provides(): array + public function addIncompleteTest(\PHPUnit\Framework\Test $test, \Throwable $t, float $time): void { } - /** - * @return list<\PHPUnit\Framework\ExecutionOrderDependency> - */ - public function requires(): array + public function addRiskyTest(\PHPUnit\Framework\Test $test, \Throwable $t, float $time): void { } -} -/** - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final class TestSuiteSorter -{ - /** - * @var int - */ - public const ORDER_DEFAULT = 0; - /** - * @var int - */ - public const ORDER_RANDOMIZED = 1; - /** - * @var int - */ - public const ORDER_REVERSED = 2; - /** - * @var int - */ - public const ORDER_DEFECTS_FIRST = 3; - /** - * @var int - */ - public const ORDER_DURATION = 4; - /** - * Order tests by @size annotation 'small', 'medium', 'large'. - * - * @var int - */ - public const ORDER_SIZE = 5; - public function __construct(?\PHPUnit\Runner\TestResultCache $cache = null) + public function addSkippedTest(\PHPUnit\Framework\Test $test, \Throwable $t, float $time): void { } - /** - * @throws Exception - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - */ - public function reorderTestsInSuite(\PHPUnit\Framework\Test $suite, int $order, bool $resolveDependencies, int $orderDefects, bool $isRootTestSuite = true): void + public function endTest(\PHPUnit\Framework\Test $test, float $time): void { } - public function getOriginalExecutionOrder(): array + public function startTestSuite(\PHPUnit\Framework\TestSuite $suite): void { } - public function getExecutionOrder(): array + public function endTestSuite(\PHPUnit\Framework\TestSuite $suite): void { } } /** * @internal This class is not covered by the backward compatibility promise for PHPUnit */ -final class ResultCacheExtension implements \PHPUnit\Runner\AfterIncompleteTestHook, \PHPUnit\Runner\AfterLastTestHook, \PHPUnit\Runner\AfterRiskyTestHook, \PHPUnit\Runner\AfterSkippedTestHook, \PHPUnit\Runner\AfterSuccessfulTestHook, \PHPUnit\Runner\AfterTestErrorHook, \PHPUnit\Runner\AfterTestFailureHook, \PHPUnit\Runner\AfterTestWarningHook +final class NullTestResultCache implements \PHPUnit\Runner\TestResultCache { - public function __construct(\PHPUnit\Runner\TestResultCache $cache) - { - } - public function flush(): void - { - } - public function executeAfterSuccessfulTest(string $test, float $time): void - { - } - public function executeAfterIncompleteTest(string $test, string $message, float $time): void - { - } - public function executeAfterRiskyTest(string $test, string $message, float $time): void + public function setState(string $testName, int $state): void { } - public function executeAfterSkippedTest(string $test, string $message, float $time): void + public function getState(string $testName): int { } - public function executeAfterTestError(string $test, string $message, float $time): void + public function setTime(string $testName, float $time): void { } - public function executeAfterTestFailure(string $test, string $message, float $time): void + public function getTime(string $testName): float { } - public function executeAfterTestWarning(string $test, string $message, float $time): void + public function load(): void { } - public function executeAfterLastTest(): void + public function persist(): void { } } /** * @internal This class is not covered by the backward compatibility promise for PHPUnit */ -abstract class BaseTestRunner +final class PhptTestCase implements \PHPUnit\Framework\Reorderable, \PHPUnit\Framework\SelfDescribing, \PHPUnit\Framework\Test { /** - * @var int - */ - public const STATUS_UNKNOWN = -1; - /** - * @var int - */ - public const STATUS_PASSED = 0; - /** - * @var int - */ - public const STATUS_SKIPPED = 1; - /** - * @var int - */ - public const STATUS_INCOMPLETE = 2; - /** - * @var int - */ - public const STATUS_FAILURE = 3; - /** - * @var int - */ - public const STATUS_ERROR = 4; - /** - * @var int - */ - public const STATUS_RISKY = 5; - /** - * @var int - */ - public const STATUS_WARNING = 6; - /** - * @var string + * Constructs a test case with the given filename. + * + * @throws Exception */ - public const SUITE_METHODNAME = 'suite'; + public function __construct(string $filename, ?\PHPUnit\Util\PHP\AbstractPhpProcess $phpUtil = null) + { + } /** - * Returns the loader to be used. + * Counts the number of test cases executed by run(TestResult result). */ - public function getLoader(): \PHPUnit\Runner\TestSuiteLoader + public function count(): int { } /** - * Returns the Test corresponding to the given suite. - * This is a template method, subclasses override - * the runFailed() and clearStatus() methods. - * - * @param string|string[] $suffixes + * Runs a test and collects its result in a TestResult instance. * - * @throws \PHPUnit\Framework\Exception + * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * @throws Exception + * @throws \SebastianBergmann\CodeCoverage\InvalidArgumentException + * @throws \SebastianBergmann\CodeCoverage\UnintentionallyCoveredCodeException */ - public function getTest(string $suiteClassFile, $suffixes = ''): ?\PHPUnit\Framework\TestSuite + public function run(?\PHPUnit\Framework\TestResult $result = null): \PHPUnit\Framework\TestResult { } /** - * Returns the loaded ReflectionClass for a suite name. + * Returns the name of the test case. */ - protected function loadSuiteClass(string $suiteClassFile): \ReflectionClass + public function getName(): string { } /** - * Clears the status message. + * Returns a string representation of the test case. */ - protected function clearStatus(): void + public function toString(): string + { + } + public function usesDataProvider(): bool + { + } + public function getNumAssertions(): int + { + } + public function getActualOutput(): string + { + } + public function hasOutput(): bool + { + } + public function sortId(): string { } /** - * Override to define how to handle a failed loading of - * a test suite. + * @return list<\PHPUnit\Framework\ExecutionOrderDependency> */ - abstract protected function runFailed(string $message): void; -} -/** - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final class Exception extends \RuntimeException implements \PHPUnit\Exception -{ + public function provides(): array + { + } + /** + * @return list<\PHPUnit\Framework\ExecutionOrderDependency> + */ + public function requires(): array + { + } } /** * @internal This class is not covered by the backward compatibility promise for PHPUnit */ -final class NullTestResultCache implements \PHPUnit\Runner\TestResultCache +final class ResultCacheExtension implements \PHPUnit\Runner\AfterIncompleteTestHook, \PHPUnit\Runner\AfterLastTestHook, \PHPUnit\Runner\AfterRiskyTestHook, \PHPUnit\Runner\AfterSkippedTestHook, \PHPUnit\Runner\AfterSuccessfulTestHook, \PHPUnit\Runner\AfterTestErrorHook, \PHPUnit\Runner\AfterTestFailureHook, \PHPUnit\Runner\AfterTestWarningHook { - public function setState(string $testName, int $state): void + public function __construct(\PHPUnit\Runner\TestResultCache $cache) { } - public function getState(string $testName): int + public function flush(): void { } - public function setTime(string $testName, float $time): void + public function executeAfterSuccessfulTest(string $test, float $time): void { } - public function getTime(string $testName): float + public function executeAfterIncompleteTest(string $test, string $message, float $time): void { } - public function load(): void + public function executeAfterRiskyTest(string $test, string $message, float $time): void { } - public function persist(): void + public function executeAfterSkippedTest(string $test, string $message, float $time): void + { + } + public function executeAfterTestError(string $test, string $message, float $time): void + { + } + public function executeAfterTestFailure(string $test, string $message, float $time): void + { + } + public function executeAfterTestWarning(string $test, string $message, float $time): void + { + } + public function executeAfterLastTest(): void { } } @@ -9655,6 +9611,18 @@ public function reload(\ReflectionClass $aClass): \ReflectionClass { } } +/** + * @internal This class is not covered by the backward compatibility promise for PHPUnit + */ +interface TestResultCache +{ + public function setState(string $testName, int $state): void; + public function getState(string $testName): int; + public function setTime(string $testName, float $time): void; + public function getTime(string $testName): float; + public function load(): void; + public function persist(): void; +} /** * @deprecated see https://github.com/sebastianbergmann/phpunit/issues/4039 * @@ -9668,45 +9636,77 @@ public function reload(\ReflectionClass $aClass): \ReflectionClass; /** * @internal This class is not covered by the backward compatibility promise for PHPUnit */ -final class DefaultTestResultCache implements \PHPUnit\Runner\TestResultCache +final class TestSuiteSorter { - public function __construct(?string $filepath = null) + /** + * @var int + */ + public const ORDER_DEFAULT = 0; + /** + * @var int + */ + public const ORDER_RANDOMIZED = 1; + /** + * @var int + */ + public const ORDER_REVERSED = 2; + /** + * @var int + */ + public const ORDER_DEFECTS_FIRST = 3; + /** + * @var int + */ + public const ORDER_DURATION = 4; + /** + * Order tests by @size annotation 'small', 'medium', 'large'. + * + * @var int + */ + public const ORDER_SIZE = 5; + public function __construct(?\PHPUnit\Runner\TestResultCache $cache = null) { } - public function setState(string $testName, int $state): void + /** + * @throws Exception + * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + */ + public function reorderTestsInSuite(\PHPUnit\Framework\Test $suite, int $order, bool $resolveDependencies, int $orderDefects, bool $isRootTestSuite = true): void { } - public function getState(string $testName): int + public function getOriginalExecutionOrder(): array { } - public function setTime(string $testName, float $time): void + public function getExecutionOrder(): array { } - public function getTime(string $testName): float +} +/** + * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit + */ +final class Version +{ + /** + * Returns the current version of PHPUnit. + * + * @phan-return non-empty-string + */ + public static function id(): string { } - public function load(): void + /** + * @phan-return non-empty-string + */ + public static function series(): string { } /** - * @throws Exception + * @phan-return non-empty-string */ - public function persist(): void + public static function getVersionString(): string { } } -/** - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -interface TestResultCache -{ - public function setState(string $testName, int $state): void; - public function getState(string $testName): int; - public function setTime(string $testName, float $time): void; - public function getTime(string $testName): float; - public function load(): void; - public function persist(): void; -} namespace PHPUnit\Runner\Extension; /** @@ -9743,6 +9743,12 @@ public function loadPharExtensionsInDirectory(string $directory): array } namespace PHPUnit\Runner\Filter; +/** + * @internal This class is not covered by the backward compatibility promise for PHPUnit + */ +final class ExcludeGroupFilterIterator extends \PHPUnit\Runner\Filter\GroupFilterIterator +{ +} /** * @internal This class is not covered by the backward compatibility promise for PHPUnit */ @@ -9760,24 +9766,6 @@ public function factory(\Iterator $iterator, \PHPUnit\Framework\TestSuite $suite { } } -/** - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final class NameFilterIterator extends \RecursiveFilterIterator -{ - /** - * @throws \Exception - */ - public function __construct(\RecursiveIterator $iterator, string $filter) - { - } - /** - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - */ - public function accept(): bool - { - } -} /** * @internal This class is not covered by the backward compatibility promise for PHPUnit */ @@ -9795,85 +9783,32 @@ public function accept(): bool } abstract protected function doAccept(string $hash); } -/** - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final class ExcludeGroupFilterIterator extends \PHPUnit\Runner\Filter\GroupFilterIterator -{ -} /** * @internal This class is not covered by the backward compatibility promise for PHPUnit */ final class IncludeGroupFilterIterator extends \PHPUnit\Runner\Filter\GroupFilterIterator { } -namespace PHPUnit\TextUI; - -/** - * @internal This interface is not covered by the backward compatibility promise for PHPUnit - */ -final class RuntimeException extends \RuntimeException implements \PHPUnit\TextUI\Exception -{ -} -/** - * @internal This interface is not covered by the backward compatibility promise for PHPUnit - */ -final class TestDirectoryNotFoundException extends \RuntimeException implements \PHPUnit\TextUI\Exception -{ - public function __construct(string $path) - { - } -} -/** - * @internal This interface is not covered by the backward compatibility promise for PHPUnit - */ -interface Exception extends \Throwable -{ -} -/** - * @internal This interface is not covered by the backward compatibility promise for PHPUnit - */ -final class TestFileNotFoundException extends \RuntimeException implements \PHPUnit\TextUI\Exception -{ - public function __construct(string $path) - { - } -} -/** - * @internal This interface is not covered by the backward compatibility promise for PHPUnit - */ -final class ReflectionException extends \RuntimeException implements \PHPUnit\TextUI\Exception -{ -} /** * @internal This class is not covered by the backward compatibility promise for PHPUnit */ -final class TestRunner extends \PHPUnit\Runner\BaseTestRunner +final class NameFilterIterator extends \RecursiveFilterIterator { - public const SUCCESS_EXIT = 0; - public const FAILURE_EXIT = 1; - public const EXCEPTION_EXIT = 2; - public function __construct(?\PHPUnit\Runner\TestSuiteLoader $loader = null, ?\SebastianBergmann\CodeCoverage\Filter $filter = null) - { - } /** - * @throws \PHPUnit\Runner\Exception - * @throws \PHPUnit\Framework\Exception - * @throws XmlConfiguration\Exception + * @throws \Exception */ - public function run(\PHPUnit\Framework\TestSuite $suite, array $arguments = [], array $warnings = [], bool $exit = true): \PHPUnit\Framework\TestResult + public function __construct(\RecursiveIterator $iterator, string $filter) { } /** - * Returns the loader to be used. + * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException */ - public function getLoader(): \PHPUnit\Runner\TestSuiteLoader - { - } - public function addExtension(\PHPUnit\Runner\Hook $extension): void + public function accept(): bool { } } +namespace PHPUnit\TextUI; + /** * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit */ @@ -9972,59 +9907,22 @@ protected function handlePrinter(string $printerClass, string $printerFile = '') /** * Loads a bootstrap file. */ - protected function handleBootstrap(string $filename): void - { - } - protected function handleVersionCheck(): void - { - } - /** - * Show the help message. - */ - protected function showHelp(): void - { - } - /** - * Custom callback for test suite discovery. - */ - protected function handleCustomTestSuite(): void - { - } -} -/** - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final class Help -{ - public function __construct(?int $width = null, ?bool $withColor = null) - { - } - /** - * Write the help file to the CLI, adapting width and colors to the console. - */ - public function writeToConsole(): void - { - } -} -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - */ -interface ResultPrinter extends \PHPUnit\Framework\TestListener -{ - public function printResult(\PHPUnit\Framework\TestResult $result): void; - public function write(string $buffer): void; -} -/** - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final class TestSuiteMapper -{ + protected function handleBootstrap(string $filename): void + { + } + protected function handleVersionCheck(): void + { + } /** - * @throws RuntimeException - * @throws TestDirectoryNotFoundException - * @throws TestFileNotFoundException + * Show the help message. */ - public function map(\PHPUnit\TextUI\XmlConfiguration\TestSuiteCollection $configuration, string $filter): \PHPUnit\Framework\TestSuite + protected function showHelp(): void + { + } + /** + * Custom callback for test suite discovery. + */ + protected function handleCustomTestSuite(): void { } } @@ -10217,8 +10115,119 @@ protected function writeProgressWithColor(string $color, string $buffer): void { } } +/** + * @internal This interface is not covered by the backward compatibility promise for PHPUnit + */ +interface Exception extends \Throwable +{ +} +/** + * @internal This interface is not covered by the backward compatibility promise for PHPUnit + */ +final class ReflectionException extends \RuntimeException implements \PHPUnit\TextUI\Exception +{ +} +/** + * @internal This interface is not covered by the backward compatibility promise for PHPUnit + */ +final class RuntimeException extends \RuntimeException implements \PHPUnit\TextUI\Exception +{ +} +/** + * @internal This interface is not covered by the backward compatibility promise for PHPUnit + */ +final class TestDirectoryNotFoundException extends \RuntimeException implements \PHPUnit\TextUI\Exception +{ + public function __construct(string $path) + { + } +} +/** + * @internal This interface is not covered by the backward compatibility promise for PHPUnit + */ +final class TestFileNotFoundException extends \RuntimeException implements \PHPUnit\TextUI\Exception +{ + public function __construct(string $path) + { + } +} +/** + * @internal This class is not covered by the backward compatibility promise for PHPUnit + */ +final class Help +{ + public function __construct(?int $width = null, ?bool $withColor = null) + { + } + /** + * Write the help file to the CLI, adapting width and colors to the console. + */ + public function writeToConsole(): void + { + } +} +/** + * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit + */ +interface ResultPrinter extends \PHPUnit\Framework\TestListener +{ + public function printResult(\PHPUnit\Framework\TestResult $result): void; + public function write(string $buffer): void; +} +/** + * @internal This class is not covered by the backward compatibility promise for PHPUnit + */ +final class TestRunner extends \PHPUnit\Runner\BaseTestRunner +{ + public const SUCCESS_EXIT = 0; + public const FAILURE_EXIT = 1; + public const EXCEPTION_EXIT = 2; + public function __construct(?\PHPUnit\Runner\TestSuiteLoader $loader = null, ?\SebastianBergmann\CodeCoverage\Filter $filter = null) + { + } + /** + * @throws \PHPUnit\Runner\Exception + * @throws \PHPUnit\Framework\Exception + * @throws XmlConfiguration\Exception + */ + public function run(\PHPUnit\Framework\TestSuite $suite, array $arguments = [], array $warnings = [], bool $exit = true): \PHPUnit\Framework\TestResult + { + } + /** + * Returns the loader to be used. + */ + public function getLoader(): \PHPUnit\Runner\TestSuiteLoader + { + } + public function addExtension(\PHPUnit\Runner\Hook $extension): void + { + } +} +/** + * @internal This class is not covered by the backward compatibility promise for PHPUnit + */ +final class TestSuiteMapper +{ + /** + * @throws RuntimeException + * @throws TestDirectoryNotFoundException + * @throws TestFileNotFoundException + */ + public function map(\PHPUnit\TextUI\XmlConfiguration\TestSuiteCollection $configuration, string $filter): \PHPUnit\Framework\TestSuite + { + } +} namespace PHPUnit\TextUI\CliArguments; +/** + * @internal This class is not covered by the backward compatibility promise for PHPUnit + */ +final class Builder +{ + public function fromParameters(array $parameters, array $additionalLongOptions): \PHPUnit\TextUI\CliArguments\Configuration + { + } +} /** * @internal This class is not covered by the backward compatibility promise for PHPUnit * @@ -11049,169 +11058,87 @@ public function xdebugFilterFile(): string /** * @internal This class is not covered by the backward compatibility promise for PHPUnit */ -final class Mapper +final class Exception extends \RuntimeException implements \PHPUnit\Exception { - /** - * @throws Exception - */ - public function mapToLegacyArray(\PHPUnit\TextUI\CliArguments\Configuration $arguments): array - { - } } /** * @internal This class is not covered by the backward compatibility promise for PHPUnit */ -final class Builder +final class Mapper { - public function fromParameters(array $parameters, array $additionalLongOptions): \PHPUnit\TextUI\CliArguments\Configuration + /** + * @throws Exception + */ + public function mapToLegacyArray(\PHPUnit\TextUI\CliArguments\Configuration $arguments): array { } } -/** - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final class Exception extends \RuntimeException implements \PHPUnit\Exception -{ -} namespace PHPUnit\TextUI\XmlConfiguration; /** * @internal This class is not covered by the backward compatibility promise for PHPUnit * * @phan-side-effect-free - * - * @template-implements \IteratorAggregate */ -final class TestFileCollection implements \Countable, \IteratorAggregate +final class Configuration { - /** - * @param TestFile[] $files - */ - public static function fromArray(array $files): self - { - } - /** - * @return TestFile[] - */ - public function asArray(): array - { - } - public function count(): int - { - } - public function getIterator(): \PHPUnit\TextUI\XmlConfiguration\TestFileCollectionIterator + public function __construct(string $filename, \PHPUnit\Util\Xml\ValidationResult $validationResult, \PHPUnit\TextUI\XmlConfiguration\ExtensionCollection $extensions, \PHPUnit\TextUI\XmlConfiguration\CodeCoverage\CodeCoverage $codeCoverage, \PHPUnit\TextUI\XmlConfiguration\Groups $groups, \PHPUnit\TextUI\XmlConfiguration\Groups $testdoxGroups, \PHPUnit\TextUI\XmlConfiguration\ExtensionCollection $listeners, \PHPUnit\TextUI\XmlConfiguration\Logging\Logging $logging, \PHPUnit\TextUI\XmlConfiguration\Php $php, \PHPUnit\TextUI\XmlConfiguration\PHPUnit $phpunit, \PHPUnit\TextUI\XmlConfiguration\TestSuiteCollection $testSuite) { } - public function isEmpty(): bool + public function filename(): string { } -} -/** - * @internal This class is not covered by the backward compatibility promise for PHPUnit - * - * @phan-side-effect-free - * - * @template-implements \IteratorAggregate - */ -final class TestDirectoryCollection implements \Countable, \IteratorAggregate -{ - /** - * @param TestDirectory[] $directories - */ - public static function fromArray(array $directories): self + public function hasValidationErrors(): bool { } - /** - * @return TestDirectory[] - */ - public function asArray(): array + public function validationErrors(): string { } - public function count(): int + public function extensions(): \PHPUnit\TextUI\XmlConfiguration\ExtensionCollection { } - public function getIterator(): \PHPUnit\TextUI\XmlConfiguration\TestDirectoryCollectionIterator + public function codeCoverage(): \PHPUnit\TextUI\XmlConfiguration\CodeCoverage\CodeCoverage { } - public function isEmpty(): bool + public function groups(): \PHPUnit\TextUI\XmlConfiguration\Groups { } -} -/** - * @internal This class is not covered by the backward compatibility promise for PHPUnit - * - * @phan-side-effect-free - */ -final class TestDirectory -{ - public function __construct(string $path, string $prefix, string $suffix, string $phpVersion, \PHPUnit\Util\VersionComparisonOperator $phpVersionOperator) + public function testdoxGroups(): \PHPUnit\TextUI\XmlConfiguration\Groups { } - public function path(): string + public function listeners(): \PHPUnit\TextUI\XmlConfiguration\ExtensionCollection { } - public function prefix(): string + public function logging(): \PHPUnit\TextUI\XmlConfiguration\Logging\Logging { } - public function suffix(): string + public function php(): \PHPUnit\TextUI\XmlConfiguration\Php { } - public function phpVersion(): string + public function phpunit(): \PHPUnit\TextUI\XmlConfiguration\PHPUnit { } - public function phpVersionOperator(): \PHPUnit\Util\VersionComparisonOperator + public function testSuite(): \PHPUnit\TextUI\XmlConfiguration\TestSuiteCollection { } } /** * @internal This class is not covered by the backward compatibility promise for PHPUnit - * - * @template-implements \Iterator */ -final class TestFileCollectionIterator implements \Countable, \Iterator +final class Exception extends \RuntimeException implements \PHPUnit\Exception { - public function __construct(\PHPUnit\TextUI\XmlConfiguration\TestFileCollection $files) - { - } - public function count(): int - { - } - public function rewind(): void - { - } - public function valid(): bool - { - } - public function key(): int - { - } - public function current(): \PHPUnit\TextUI\XmlConfiguration\TestFile - { - } - public function next(): void - { - } } /** * @internal This class is not covered by the backward compatibility promise for PHPUnit * * @phan-side-effect-free */ -final class TestSuite +final class Directory { - public function __construct(string $name, \PHPUnit\TextUI\XmlConfiguration\TestDirectoryCollection $directories, \PHPUnit\TextUI\XmlConfiguration\TestFileCollection $files, \PHPUnit\TextUI\XmlConfiguration\FileCollection $exclude) - { - } - public function name(): string - { - } - public function directories(): \PHPUnit\TextUI\XmlConfiguration\TestDirectoryCollection - { - } - public function files(): \PHPUnit\TextUI\XmlConfiguration\TestFileCollection + public function __construct(string $path) { } - public function exclude(): \PHPUnit\TextUI\XmlConfiguration\FileCollection + public function path(): string { } } @@ -11219,30 +11146,41 @@ public function exclude(): \PHPUnit\TextUI\XmlConfiguration\FileCollection * @internal This class is not covered by the backward compatibility promise for PHPUnit * * @phan-side-effect-free + * + * @template-implements \IteratorAggregate */ -final class TestFile +final class DirectoryCollection implements \Countable, \IteratorAggregate { - public function __construct(string $path, string $phpVersion, \PHPUnit\Util\VersionComparisonOperator $phpVersionOperator) + /** + * @param Directory[] $directories + */ + public static function fromArray(array $directories): self { } - public function path(): string + /** + * @return Directory[] + */ + public function asArray(): array { } - public function phpVersion(): string + public function count(): int { } - public function phpVersionOperator(): \PHPUnit\Util\VersionComparisonOperator + public function getIterator(): \PHPUnit\TextUI\XmlConfiguration\DirectoryCollectionIterator + { + } + public function isEmpty(): bool { } } /** * @internal This class is not covered by the backward compatibility promise for PHPUnit * - * @template-implements \Iterator + * @template-implements \Iterator */ -final class TestDirectoryCollectionIterator implements \Countable, \Iterator +final class DirectoryCollectionIterator implements \Countable, \Iterator { - public function __construct(\PHPUnit\TextUI\XmlConfiguration\TestDirectoryCollection $directories) + public function __construct(\PHPUnit\TextUI\XmlConfiguration\DirectoryCollection $directories) { } public function count(): int @@ -11257,7 +11195,7 @@ public function valid(): bool public function key(): int { } - public function current(): \PHPUnit\TextUI\XmlConfiguration\TestDirectory + public function current(): \PHPUnit\TextUI\XmlConfiguration\Directory { } public function next(): void @@ -11268,19 +11206,33 @@ public function next(): void * @internal This class is not covered by the backward compatibility promise for PHPUnit * * @phan-side-effect-free + */ +final class File +{ + public function __construct(string $path) + { + } + public function path(): string + { + } +} +/** + * @internal This class is not covered by the backward compatibility promise for PHPUnit * - * @template-implements \IteratorAggregate + * @phan-side-effect-free + * + * @template-implements \IteratorAggregate */ -final class TestSuiteCollection implements \Countable, \IteratorAggregate +final class FileCollection implements \Countable, \IteratorAggregate { /** - * @param TestSuite[] $testSuites + * @param File[] $files */ - public static function fromArray(array $testSuites): self + public static function fromArray(array $files): self { } /** - * @return TestSuite[] + * @return File[] */ public function asArray(): array { @@ -11288,7 +11240,7 @@ public function asArray(): array public function count(): int { } - public function getIterator(): \PHPUnit\TextUI\XmlConfiguration\TestSuiteCollectionIterator + public function getIterator(): \PHPUnit\TextUI\XmlConfiguration\FileCollectionIterator { } public function isEmpty(): bool @@ -11298,11 +11250,11 @@ public function isEmpty(): bool /** * @internal This class is not covered by the backward compatibility promise for PHPUnit * - * @template-implements \Iterator + * @template-implements \Iterator */ -final class TestSuiteCollectionIterator implements \Countable, \Iterator +final class FileCollectionIterator implements \Countable, \Iterator { - public function __construct(\PHPUnit\TextUI\XmlConfiguration\TestSuiteCollection $testSuites) + public function __construct(\PHPUnit\TextUI\XmlConfiguration\FileCollection $files) { } public function count(): int @@ -11317,7 +11269,7 @@ public function valid(): bool public function key(): int { } - public function current(): \PHPUnit\TextUI\XmlConfiguration\TestSuite + public function current(): \PHPUnit\TextUI\XmlConfiguration\File { } public function next(): void @@ -11338,148 +11290,320 @@ public function generateDefaultConfiguration(string $phpunitVersion, string $boo * * @phan-side-effect-free */ -final class Configuration +final class Group { - public function __construct(string $filename, \PHPUnit\Util\Xml\ValidationResult $validationResult, \PHPUnit\TextUI\XmlConfiguration\ExtensionCollection $extensions, \PHPUnit\TextUI\XmlConfiguration\CodeCoverage\CodeCoverage $codeCoverage, \PHPUnit\TextUI\XmlConfiguration\Groups $groups, \PHPUnit\TextUI\XmlConfiguration\Groups $testdoxGroups, \PHPUnit\TextUI\XmlConfiguration\ExtensionCollection $listeners, \PHPUnit\TextUI\XmlConfiguration\Logging\Logging $logging, \PHPUnit\TextUI\XmlConfiguration\Php $php, \PHPUnit\TextUI\XmlConfiguration\PHPUnit $phpunit, \PHPUnit\TextUI\XmlConfiguration\TestSuiteCollection $testSuite) + public function __construct(string $name) { } - public function filename(): string + public function name(): string { } - public function hasValidationErrors(): bool +} +/** + * @internal This class is not covered by the backward compatibility promise for PHPUnit + * + * @phan-side-effect-free + * + * @template-implements \IteratorAggregate + */ +final class GroupCollection implements \IteratorAggregate +{ + /** + * @param Group[] $groups + */ + public static function fromArray(array $groups): self { } - public function validationErrors(): string + /** + * @return Group[] + */ + public function asArray(): array { } - public function extensions(): \PHPUnit\TextUI\XmlConfiguration\ExtensionCollection + /** + * @return string[] + */ + public function asArrayOfStrings(): array { } - public function codeCoverage(): \PHPUnit\TextUI\XmlConfiguration\CodeCoverage\CodeCoverage + public function isEmpty(): bool { } - public function groups(): \PHPUnit\TextUI\XmlConfiguration\Groups + public function getIterator(): \PHPUnit\TextUI\XmlConfiguration\GroupCollectionIterator { } - public function testdoxGroups(): \PHPUnit\TextUI\XmlConfiguration\Groups +} +/** + * @internal This class is not covered by the backward compatibility promise for PHPUnit + * + * @template-implements \Iterator + */ +final class GroupCollectionIterator implements \Countable, \Iterator +{ + public function __construct(\PHPUnit\TextUI\XmlConfiguration\GroupCollection $groups) { } - public function listeners(): \PHPUnit\TextUI\XmlConfiguration\ExtensionCollection + public function count(): int { } - public function logging(): \PHPUnit\TextUI\XmlConfiguration\Logging\Logging + public function rewind(): void { } - public function php(): \PHPUnit\TextUI\XmlConfiguration\Php + public function valid(): bool { } - public function phpunit(): \PHPUnit\TextUI\XmlConfiguration\PHPUnit + public function key(): int { } - public function testSuite(): \PHPUnit\TextUI\XmlConfiguration\TestSuiteCollection + public function current(): \PHPUnit\TextUI\XmlConfiguration\Group + { + } + public function next(): void { } } /** * @internal This class is not covered by the backward compatibility promise for PHPUnit * - * @template-implements \Iterator + * @phan-side-effect-free */ -final class DirectoryCollectionIterator implements \Countable, \Iterator +final class Groups { - public function __construct(\PHPUnit\TextUI\XmlConfiguration\DirectoryCollection $directories) + public function __construct(\PHPUnit\TextUI\XmlConfiguration\GroupCollection $include, \PHPUnit\TextUI\XmlConfiguration\GroupCollection $exclude) { } - public function count(): int + public function hasInclude(): bool { } - public function rewind(): void + public function include(): \PHPUnit\TextUI\XmlConfiguration\GroupCollection { } - public function valid(): bool + public function hasExclude(): bool { } - public function key(): int + public function exclude(): \PHPUnit\TextUI\XmlConfiguration\GroupCollection { } - public function current(): \PHPUnit\TextUI\XmlConfiguration\Directory +} +/** + * @internal This class is not covered by the backward compatibility promise for PHPUnit + */ +final class Loader +{ + /** + * @throws Exception + */ + public function load(string $filename): \PHPUnit\TextUI\XmlConfiguration\Configuration { } - public function next(): void + public function logging(string $filename, \DOMXPath $xpath): \PHPUnit\TextUI\XmlConfiguration\Logging\Logging + { + } + public function legacyLogging(string $filename, \DOMXPath $xpath): \PHPUnit\TextUI\XmlConfiguration\Logging\Logging { } } /** * @internal This class is not covered by the backward compatibility promise for PHPUnit - * - * @template-implements \Iterator */ -final class FileCollectionIterator implements \Countable, \Iterator +final class MigrationBuilder { - public function __construct(\PHPUnit\TextUI\XmlConfiguration\FileCollection $files) + /** + * @throws MigrationBuilderException + */ + public function build(string $fromVersion): array { } - public function count(): int +} +/** + * @internal This class is not covered by the backward compatibility promise for PHPUnit + */ +final class MigrationBuilderException extends \RuntimeException implements \PHPUnit\Exception +{ +} +/** + * @internal This class is not covered by the backward compatibility promise for PHPUnit + */ +final class MigrationException extends \RuntimeException implements \PHPUnit\Exception +{ +} +/** + * @internal This class is not covered by the backward compatibility promise for PHPUnit + */ +final class ConvertLogTypes implements \PHPUnit\TextUI\XmlConfiguration\Migration +{ + public function migrate(\DOMDocument $document): void { } - public function rewind(): void +} +/** + * @internal This class is not covered by the backward compatibility promise for PHPUnit + */ +final class CoverageCloverToReport extends \PHPUnit\TextUI\XmlConfiguration\LogToReportMigration +{ +} +/** + * @internal This class is not covered by the backward compatibility promise for PHPUnit + */ +final class CoverageCrap4jToReport extends \PHPUnit\TextUI\XmlConfiguration\LogToReportMigration +{ +} +/** + * @internal This class is not covered by the backward compatibility promise for PHPUnit + */ +final class CoverageHtmlToReport extends \PHPUnit\TextUI\XmlConfiguration\LogToReportMigration +{ +} +/** + * @internal This class is not covered by the backward compatibility promise for PHPUnit + */ +final class CoveragePhpToReport extends \PHPUnit\TextUI\XmlConfiguration\LogToReportMigration +{ +} +/** + * @internal This class is not covered by the backward compatibility promise for PHPUnit + */ +final class CoverageTextToReport extends \PHPUnit\TextUI\XmlConfiguration\LogToReportMigration +{ +} +/** + * @internal This class is not covered by the backward compatibility promise for PHPUnit + */ +final class CoverageXmlToReport extends \PHPUnit\TextUI\XmlConfiguration\LogToReportMigration +{ +} +/** + * @internal This class is not covered by the backward compatibility promise for PHPUnit + */ +final class IntroduceCoverageElement implements \PHPUnit\TextUI\XmlConfiguration\Migration +{ + public function migrate(\DOMDocument $document): void { } - public function valid(): bool +} +/** + * @internal This class is not covered by the backward compatibility promise for PHPUnit + */ +abstract class LogToReportMigration implements \PHPUnit\TextUI\XmlConfiguration\Migration +{ + /** + * @throws MigrationException + */ + public function migrate(\DOMDocument $document): void { } - public function key(): int + protected function migrateAttributes(\DOMElement $src, \DOMElement $dest, array $attributes): void { } - public function current(): \PHPUnit\TextUI\XmlConfiguration\File + abstract protected function forType(): string; + abstract protected function toReportFormat(\DOMElement $logNode): \DOMElement; +} +/** + * @internal This class is not covered by the backward compatibility promise for PHPUnit + */ +interface Migration +{ + public function migrate(\DOMDocument $document): void; +} +/** + * @internal This class is not covered by the backward compatibility promise for PHPUnit + */ +final class MoveAttributesFromFilterWhitelistToCoverage implements \PHPUnit\TextUI\XmlConfiguration\Migration +{ + /** + * @throws MigrationException + */ + public function migrate(\DOMDocument $document): void { } - public function next(): void +} +/** + * @internal This class is not covered by the backward compatibility promise for PHPUnit + */ +final class MoveAttributesFromRootToCoverage implements \PHPUnit\TextUI\XmlConfiguration\Migration +{ + /** + * @throws MigrationException + */ + public function migrate(\DOMDocument $document): void { } } /** * @internal This class is not covered by the backward compatibility promise for PHPUnit - * - * @phan-side-effect-free - * - * @template-implements \IteratorAggregate */ -final class DirectoryCollection implements \Countable, \IteratorAggregate +final class MoveWhitelistExcludesToCoverage implements \PHPUnit\TextUI\XmlConfiguration\Migration { /** - * @param Directory[] $directories + * @throws MigrationException */ - public static function fromArray(array $directories): self + public function migrate(\DOMDocument $document): void { } +} +/** + * @internal This class is not covered by the backward compatibility promise for PHPUnit + */ +final class MoveWhitelistIncludesToCoverage implements \PHPUnit\TextUI\XmlConfiguration\Migration +{ /** - * @return Directory[] + * @throws MigrationException */ - public function asArray(): array + public function migrate(\DOMDocument $document): void { } - public function count(): int +} +/** + * @internal This class is not covered by the backward compatibility promise for PHPUnit + */ +final class RemoveCacheTokensAttribute implements \PHPUnit\TextUI\XmlConfiguration\Migration +{ + public function migrate(\DOMDocument $document): void { } - public function getIterator(): \PHPUnit\TextUI\XmlConfiguration\DirectoryCollectionIterator +} +/** + * @internal This class is not covered by the backward compatibility promise for PHPUnit + */ +final class RemoveEmptyFilter implements \PHPUnit\TextUI\XmlConfiguration\Migration +{ + /** + * @throws MigrationException + */ + public function migrate(\DOMDocument $document): void { } - public function isEmpty(): bool +} +/** + * @internal This class is not covered by the backward compatibility promise for PHPUnit + */ +final class RemoveLogTypes implements \PHPUnit\TextUI\XmlConfiguration\Migration +{ + public function migrate(\DOMDocument $document): void { } } /** * @internal This class is not covered by the backward compatibility promise for PHPUnit - * - * @phan-side-effect-free */ -final class File +final class UpdateSchemaLocationTo93 implements \PHPUnit\TextUI\XmlConfiguration\Migration { - public function __construct(string $path) + public function migrate(\DOMDocument $document): void { } - public function path(): string +} +/** + * @internal This class is not covered by the backward compatibility promise for PHPUnit + */ +final class Migrator +{ + /** + * @throws Exception + * @throws MigrationBuilderException + * @throws MigrationException + * @throws \PHPUnit\Util\Xml\Exception + */ + public function migrate(string $filename): string { } } @@ -11488,12 +11612,15 @@ public function path(): string * * @phan-side-effect-free */ -final class Directory +final class Constant { - public function __construct(string $path) + public function __construct(string $name, $value) { } - public function path(): string + public function name(): string + { + } + public function value() { } } @@ -11502,18 +11629,18 @@ public function path(): string * * @phan-side-effect-free * - * @template-implements \IteratorAggregate + * @template-implements \IteratorAggregate */ -final class FileCollection implements \Countable, \IteratorAggregate +final class ConstantCollection implements \Countable, \IteratorAggregate { /** - * @param File[] $files + * @param Constant[] $constants */ - public static function fromArray(array $files): self + public static function fromArray(array $constants): self { } /** - * @return File[] + * @return Constant[] */ public function asArray(): array { @@ -11521,283 +11648,272 @@ public function asArray(): array public function count(): int { } - public function getIterator(): \PHPUnit\TextUI\XmlConfiguration\FileCollectionIterator - { - } - public function isEmpty(): bool + public function getIterator(): \PHPUnit\TextUI\XmlConfiguration\ConstantCollectionIterator { } } /** * @internal This class is not covered by the backward compatibility promise for PHPUnit * - * @phan-side-effect-free + * @template-implements \Iterator */ -final class PHPUnit +final class ConstantCollectionIterator implements \Countable, \Iterator { - public function __construct(bool $cacheResult, ?string $cacheResultFile, $columns, string $colors, bool $stderr, bool $noInteraction, bool $verbose, bool $reverseDefectList, bool $convertDeprecationsToExceptions, bool $convertErrorsToExceptions, bool $convertNoticesToExceptions, bool $convertWarningsToExceptions, bool $forceCoversAnnotation, ?string $bootstrap, bool $processIsolation, bool $failOnEmptyTestSuite, bool $failOnIncomplete, bool $failOnRisky, bool $failOnSkipped, bool $failOnWarning, bool $stopOnDefect, bool $stopOnError, bool $stopOnFailure, bool $stopOnWarning, bool $stopOnIncomplete, bool $stopOnRisky, bool $stopOnSkipped, ?string $extensionsDirectory, ?string $testSuiteLoaderClass, ?string $testSuiteLoaderFile, ?string $printerClass, ?string $printerFile, bool $beStrictAboutChangesToGlobalState, bool $beStrictAboutOutputDuringTests, bool $beStrictAboutResourceUsageDuringSmallTests, bool $beStrictAboutTestsThatDoNotTestAnything, bool $beStrictAboutTodoAnnotatedTests, bool $beStrictAboutCoversAnnotation, bool $enforceTimeLimit, int $defaultTimeLimit, int $timeoutForSmallTests, int $timeoutForMediumTests, int $timeoutForLargeTests, ?string $defaultTestSuite, int $executionOrder, bool $resolveDependencies, bool $defectsFirst, bool $backupGlobals, bool $backupStaticAttributes, bool $registerMockObjectsFromTestArgumentsRecursively, bool $conflictBetweenPrinterClassAndTestdox) - { - } - public function cacheResult(): bool - { - } - /** - * @psalm-assert-if-true !null $this->cacheResultFile - */ - public function hasCacheResultFile(): bool - { - } - /** - * @throws Exception - */ - public function cacheResultFile(): string - { - } - public function columns() - { - } - public function colors(): string + public function __construct(\PHPUnit\TextUI\XmlConfiguration\ConstantCollection $constants) { } - public function stderr(): bool + public function count(): int { } - public function noInteraction(): bool + public function rewind(): void { } - public function verbose(): bool + public function valid(): bool { } - public function reverseDefectList(): bool + public function key(): int { } - public function convertDeprecationsToExceptions(): bool + public function current(): \PHPUnit\TextUI\XmlConfiguration\Constant { } - public function convertErrorsToExceptions(): bool + public function next(): void { } - public function convertNoticesToExceptions(): bool +} +/** + * @internal This class is not covered by the backward compatibility promise for PHPUnit + * + * @phan-side-effect-free + */ +final class IniSetting +{ + public function __construct(string $name, string $value) { } - public function convertWarningsToExceptions(): bool + public function name(): string { } - public function forceCoversAnnotation(): bool + public function value(): string { } +} +/** + * @internal This class is not covered by the backward compatibility promise for PHPUnit + * + * @phan-side-effect-free + * + * @template-implements \IteratorAggregate + */ +final class IniSettingCollection implements \Countable, \IteratorAggregate +{ /** - * @psalm-assert-if-true !null $this->bootstrap + * @param IniSetting[] $iniSettings */ - public function hasBootstrap(): bool + public static function fromArray(array $iniSettings): self { } /** - * @throws Exception + * @return IniSetting[] */ - public function bootstrap(): string - { - } - public function processIsolation(): bool - { - } - public function failOnEmptyTestSuite(): bool - { - } - public function failOnIncomplete(): bool - { - } - public function failOnRisky(): bool - { - } - public function failOnSkipped(): bool - { - } - public function failOnWarning(): bool - { - } - public function stopOnDefect(): bool - { - } - public function stopOnError(): bool + public function asArray(): array { } - public function stopOnFailure(): bool + public function count(): int { } - public function stopOnWarning(): bool + public function getIterator(): \PHPUnit\TextUI\XmlConfiguration\IniSettingCollectionIterator { } - public function stopOnIncomplete(): bool +} +/** + * @internal This class is not covered by the backward compatibility promise for PHPUnit + * + * @template-implements \Iterator + */ +final class IniSettingCollectionIterator implements \Countable, \Iterator +{ + public function __construct(\PHPUnit\TextUI\XmlConfiguration\IniSettingCollection $iniSettings) { } - public function stopOnRisky(): bool + public function count(): int { } - public function stopOnSkipped(): bool + public function rewind(): void { } - /** - * @psalm-assert-if-true !null $this->extensionsDirectory - */ - public function hasExtensionsDirectory(): bool + public function valid(): bool { } - /** - * @throws Exception - */ - public function extensionsDirectory(): string + public function key(): int { } - /** - * @psalm-assert-if-true !null $this->testSuiteLoaderClass - * - * @deprecated see https://github.com/sebastianbergmann/phpunit/issues/4039 - */ - public function hasTestSuiteLoaderClass(): bool + public function current(): \PHPUnit\TextUI\XmlConfiguration\IniSetting { } - /** - * @throws Exception - * - * @deprecated see https://github.com/sebastianbergmann/phpunit/issues/4039 - */ - public function testSuiteLoaderClass(): string + public function next(): void { } - /** - * @psalm-assert-if-true !null $this->testSuiteLoaderFile - * - * @deprecated see https://github.com/sebastianbergmann/phpunit/issues/4039 - */ - public function hasTestSuiteLoaderFile(): bool +} +/** + * @internal This class is not covered by the backward compatibility promise for PHPUnit + * + * @phan-side-effect-free + */ +final class Php +{ + public function __construct(\PHPUnit\TextUI\XmlConfiguration\DirectoryCollection $includePaths, \PHPUnit\TextUI\XmlConfiguration\IniSettingCollection $iniSettings, \PHPUnit\TextUI\XmlConfiguration\ConstantCollection $constants, \PHPUnit\TextUI\XmlConfiguration\VariableCollection $globalVariables, \PHPUnit\TextUI\XmlConfiguration\VariableCollection $envVariables, \PHPUnit\TextUI\XmlConfiguration\VariableCollection $postVariables, \PHPUnit\TextUI\XmlConfiguration\VariableCollection $getVariables, \PHPUnit\TextUI\XmlConfiguration\VariableCollection $cookieVariables, \PHPUnit\TextUI\XmlConfiguration\VariableCollection $serverVariables, \PHPUnit\TextUI\XmlConfiguration\VariableCollection $filesVariables, \PHPUnit\TextUI\XmlConfiguration\VariableCollection $requestVariables) { } - /** - * @throws Exception - * - * @deprecated see https://github.com/sebastianbergmann/phpunit/issues/4039 - */ - public function testSuiteLoaderFile(): string + public function includePaths(): \PHPUnit\TextUI\XmlConfiguration\DirectoryCollection { } - /** - * @psalm-assert-if-true !null $this->printerClass - */ - public function hasPrinterClass(): bool + public function iniSettings(): \PHPUnit\TextUI\XmlConfiguration\IniSettingCollection { } - /** - * @throws Exception - */ - public function printerClass(): string + public function constants(): \PHPUnit\TextUI\XmlConfiguration\ConstantCollection { } - /** - * @psalm-assert-if-true !null $this->printerFile - */ - public function hasPrinterFile(): bool + public function globalVariables(): \PHPUnit\TextUI\XmlConfiguration\VariableCollection { } - /** - * @throws Exception - */ - public function printerFile(): string + public function envVariables(): \PHPUnit\TextUI\XmlConfiguration\VariableCollection { } - public function beStrictAboutChangesToGlobalState(): bool + public function postVariables(): \PHPUnit\TextUI\XmlConfiguration\VariableCollection { } - public function beStrictAboutOutputDuringTests(): bool + public function getVariables(): \PHPUnit\TextUI\XmlConfiguration\VariableCollection { } - public function beStrictAboutResourceUsageDuringSmallTests(): bool + public function cookieVariables(): \PHPUnit\TextUI\XmlConfiguration\VariableCollection { } - public function beStrictAboutTestsThatDoNotTestAnything(): bool + public function serverVariables(): \PHPUnit\TextUI\XmlConfiguration\VariableCollection { } - public function beStrictAboutTodoAnnotatedTests(): bool + public function filesVariables(): \PHPUnit\TextUI\XmlConfiguration\VariableCollection { } - public function beStrictAboutCoversAnnotation(): bool + public function requestVariables(): \PHPUnit\TextUI\XmlConfiguration\VariableCollection { } - public function enforceTimeLimit(): bool +} +/** + * @internal This class is not covered by the backward compatibility promise for PHPUnit + */ +final class PhpHandler +{ + public function handle(\PHPUnit\TextUI\XmlConfiguration\Php $configuration): void { } - public function defaultTimeLimit(): int +} +/** + * @internal This class is not covered by the backward compatibility promise for PHPUnit + * + * @phan-side-effect-free + */ +final class Variable +{ + public function __construct(string $name, $value, bool $force) { } - public function timeoutForSmallTests(): int + public function name(): string { } - public function timeoutForMediumTests(): int + public function value() { } - public function timeoutForLargeTests(): int + public function force(): bool { } +} +/** + * @internal This class is not covered by the backward compatibility promise for PHPUnit + * + * @phan-side-effect-free + * + * @template-implements \IteratorAggregate + */ +final class VariableCollection implements \Countable, \IteratorAggregate +{ /** - * @psalm-assert-if-true !null $this->defaultTestSuite + * @param Variable[] $variables */ - public function hasDefaultTestSuite(): bool + public static function fromArray(array $variables): self { } /** - * @throws Exception + * @return Variable[] */ - public function defaultTestSuite(): string + public function asArray(): array { } - public function executionOrder(): int + public function count(): int { } - public function resolveDependencies(): bool + public function getIterator(): \PHPUnit\TextUI\XmlConfiguration\VariableCollectionIterator { } - public function defectsFirst(): bool +} +/** + * @internal This class is not covered by the backward compatibility promise for PHPUnit + * + * @template-implements \Iterator + */ +final class VariableCollectionIterator implements \Countable, \Iterator +{ + public function __construct(\PHPUnit\TextUI\XmlConfiguration\VariableCollection $variables) { } - public function backupGlobals(): bool + public function count(): int { } - public function backupStaticAttributes(): bool + public function rewind(): void { } - public function registerMockObjectsFromTestArgumentsRecursively(): bool + public function valid(): bool { } - public function conflictBetweenPrinterClassAndTestdox(): bool + public function key(): int + { + } + public function current(): \PHPUnit\TextUI\XmlConfiguration\Variable + { + } + public function next(): void { } } /** * @internal This class is not covered by the backward compatibility promise for PHPUnit * - * @template-implements \Iterator + * @phan-side-effect-free */ -final class ExtensionCollectionIterator implements \Countable, \Iterator +final class Extension { - public function __construct(\PHPUnit\TextUI\XmlConfiguration\ExtensionCollection $extensions) - { - } - public function count(): int + /** + * @phan-param class-string $className + */ + public function __construct(string $className, string $sourceFile, array $arguments) { } - public function rewind(): void + /** + * @phan-return class-string + */ + public function className(): string { } - public function valid(): bool + public function hasSourceFile(): bool { } - public function key(): int + public function sourceFile(): string { } - public function current(): \PHPUnit\TextUI\XmlConfiguration\Extension + public function hasArguments(): bool { } - public function next(): void + public function arguments(): array { } } @@ -11829,331 +11945,273 @@ public function getIterator(): \PHPUnit\TextUI\XmlConfiguration\ExtensionCollect /** * @internal This class is not covered by the backward compatibility promise for PHPUnit * - * @phan-side-effect-free + * @template-implements \Iterator */ -final class Extension +final class ExtensionCollectionIterator implements \Countable, \Iterator { - /** - * @phan-param class-string $className - */ - public function __construct(string $className, string $sourceFile, array $arguments) + public function __construct(\PHPUnit\TextUI\XmlConfiguration\ExtensionCollection $extensions) { } - /** - * @phan-return class-string - */ - public function className(): string + public function count(): int { } - public function hasSourceFile(): bool + public function rewind(): void { } - public function sourceFile(): string + public function valid(): bool { } - public function hasArguments(): bool + public function key(): int { } - public function arguments(): array + public function current(): \PHPUnit\TextUI\XmlConfiguration\Extension + { + } + public function next(): void { } } /** * @internal This class is not covered by the backward compatibility promise for PHPUnit + * + * @phan-side-effect-free */ -final class Migrator +final class PHPUnit { + public function __construct(bool $cacheResult, ?string $cacheResultFile, $columns, string $colors, bool $stderr, bool $noInteraction, bool $verbose, bool $reverseDefectList, bool $convertDeprecationsToExceptions, bool $convertErrorsToExceptions, bool $convertNoticesToExceptions, bool $convertWarningsToExceptions, bool $forceCoversAnnotation, ?string $bootstrap, bool $processIsolation, bool $failOnEmptyTestSuite, bool $failOnIncomplete, bool $failOnRisky, bool $failOnSkipped, bool $failOnWarning, bool $stopOnDefect, bool $stopOnError, bool $stopOnFailure, bool $stopOnWarning, bool $stopOnIncomplete, bool $stopOnRisky, bool $stopOnSkipped, ?string $extensionsDirectory, ?string $testSuiteLoaderClass, ?string $testSuiteLoaderFile, ?string $printerClass, ?string $printerFile, bool $beStrictAboutChangesToGlobalState, bool $beStrictAboutOutputDuringTests, bool $beStrictAboutResourceUsageDuringSmallTests, bool $beStrictAboutTestsThatDoNotTestAnything, bool $beStrictAboutTodoAnnotatedTests, bool $beStrictAboutCoversAnnotation, bool $enforceTimeLimit, int $defaultTimeLimit, int $timeoutForSmallTests, int $timeoutForMediumTests, int $timeoutForLargeTests, ?string $defaultTestSuite, int $executionOrder, bool $resolveDependencies, bool $defectsFirst, bool $backupGlobals, bool $backupStaticAttributes, bool $registerMockObjectsFromTestArgumentsRecursively, bool $conflictBetweenPrinterClassAndTestdox) + { + } + public function cacheResult(): bool + { + } + /** + * @psalm-assert-if-true !null $this->cacheResultFile + */ + public function hasCacheResultFile(): bool + { + } /** * @throws Exception - * @throws MigrationBuilderException - * @throws MigrationException - * @throws \PHPUnit\Util\Xml\Exception */ - public function migrate(string $filename): string + public function cacheResultFile(): string { } -} -/** - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final class MigrationBuilderException extends \RuntimeException implements \PHPUnit\Exception -{ -} -/** - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final class MigrationException extends \RuntimeException implements \PHPUnit\Exception -{ -} -/** - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final class CoverageCloverToReport extends \PHPUnit\TextUI\XmlConfiguration\LogToReportMigration -{ -} -/** - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final class UpdateSchemaLocationTo93 implements \PHPUnit\TextUI\XmlConfiguration\Migration -{ - public function migrate(\DOMDocument $document): void + public function columns() { } -} -/** - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final class IntroduceCoverageElement implements \PHPUnit\TextUI\XmlConfiguration\Migration -{ - public function migrate(\DOMDocument $document): void + public function colors(): string { } -} -/** - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -interface Migration -{ - public function migrate(\DOMDocument $document): void; -} -/** - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final class CoverageXmlToReport extends \PHPUnit\TextUI\XmlConfiguration\LogToReportMigration -{ -} -/** - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final class CoverageTextToReport extends \PHPUnit\TextUI\XmlConfiguration\LogToReportMigration -{ -} -/** - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final class RemoveLogTypes implements \PHPUnit\TextUI\XmlConfiguration\Migration -{ - public function migrate(\DOMDocument $document): void + public function stderr(): bool + { + } + public function noInteraction(): bool + { + } + public function verbose(): bool + { + } + public function reverseDefectList(): bool + { + } + public function convertDeprecationsToExceptions(): bool + { + } + public function convertErrorsToExceptions(): bool + { + } + public function convertNoticesToExceptions(): bool + { + } + public function convertWarningsToExceptions(): bool + { + } + public function forceCoversAnnotation(): bool { } -} -/** - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final class MoveAttributesFromFilterWhitelistToCoverage implements \PHPUnit\TextUI\XmlConfiguration\Migration -{ /** - * @throws MigrationException + * @psalm-assert-if-true !null $this->bootstrap */ - public function migrate(\DOMDocument $document): void + public function hasBootstrap(): bool { } -} -/** - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final class CoveragePhpToReport extends \PHPUnit\TextUI\XmlConfiguration\LogToReportMigration -{ -} -/** - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final class CoverageCrap4jToReport extends \PHPUnit\TextUI\XmlConfiguration\LogToReportMigration -{ -} -/** - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -abstract class LogToReportMigration implements \PHPUnit\TextUI\XmlConfiguration\Migration -{ /** - * @throws MigrationException + * @throws Exception */ - public function migrate(\DOMDocument $document): void + public function bootstrap(): string { } - protected function migrateAttributes(\DOMElement $src, \DOMElement $dest, array $attributes): void + public function processIsolation(): bool + { + } + public function failOnEmptyTestSuite(): bool + { + } + public function failOnIncomplete(): bool + { + } + public function failOnRisky(): bool + { + } + public function failOnSkipped(): bool + { + } + public function failOnWarning(): bool + { + } + public function stopOnDefect(): bool + { + } + public function stopOnError(): bool + { + } + public function stopOnFailure(): bool + { + } + public function stopOnWarning(): bool + { + } + public function stopOnIncomplete(): bool + { + } + public function stopOnRisky(): bool + { + } + public function stopOnSkipped(): bool { } - abstract protected function forType(): string; - abstract protected function toReportFormat(\DOMElement $logNode): \DOMElement; -} -/** - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final class MoveAttributesFromRootToCoverage implements \PHPUnit\TextUI\XmlConfiguration\Migration -{ /** - * @throws MigrationException + * @psalm-assert-if-true !null $this->extensionsDirectory */ - public function migrate(\DOMDocument $document): void + public function hasExtensionsDirectory(): bool { } -} -/** - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final class RemoveCacheTokensAttribute implements \PHPUnit\TextUI\XmlConfiguration\Migration -{ - public function migrate(\DOMDocument $document): void + /** + * @throws Exception + */ + public function extensionsDirectory(): string { } -} -/** - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final class ConvertLogTypes implements \PHPUnit\TextUI\XmlConfiguration\Migration -{ - public function migrate(\DOMDocument $document): void + /** + * @psalm-assert-if-true !null $this->testSuiteLoaderClass + * + * @deprecated see https://github.com/sebastianbergmann/phpunit/issues/4039 + */ + public function hasTestSuiteLoaderClass(): bool { } -} -/** - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final class CoverageHtmlToReport extends \PHPUnit\TextUI\XmlConfiguration\LogToReportMigration -{ -} -/** - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final class MoveWhitelistExcludesToCoverage implements \PHPUnit\TextUI\XmlConfiguration\Migration -{ /** - * @throws MigrationException + * @throws Exception + * + * @deprecated see https://github.com/sebastianbergmann/phpunit/issues/4039 */ - public function migrate(\DOMDocument $document): void + public function testSuiteLoaderClass(): string { } -} -/** - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final class MoveWhitelistIncludesToCoverage implements \PHPUnit\TextUI\XmlConfiguration\Migration -{ /** - * @throws MigrationException + * @psalm-assert-if-true !null $this->testSuiteLoaderFile + * + * @deprecated see https://github.com/sebastianbergmann/phpunit/issues/4039 */ - public function migrate(\DOMDocument $document): void + public function hasTestSuiteLoaderFile(): bool { } -} -/** - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final class RemoveEmptyFilter implements \PHPUnit\TextUI\XmlConfiguration\Migration -{ /** - * @throws MigrationException + * @throws Exception + * + * @deprecated see https://github.com/sebastianbergmann/phpunit/issues/4039 */ - public function migrate(\DOMDocument $document): void + public function testSuiteLoaderFile(): string { } -} -/** - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final class MigrationBuilder -{ /** - * @throws MigrationBuilderException + * @psalm-assert-if-true !null $this->printerClass */ - public function build(string $fromVersion): array + public function hasPrinterClass(): bool { } -} -/** - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final class Loader -{ /** * @throws Exception */ - public function load(string $filename): \PHPUnit\TextUI\XmlConfiguration\Configuration + public function printerClass(): string { } - public function logging(string $filename, \DOMXPath $xpath): \PHPUnit\TextUI\XmlConfiguration\Logging\Logging + /** + * @psalm-assert-if-true !null $this->printerFile + */ + public function hasPrinterFile(): bool { } - public function legacyLogging(string $filename, \DOMXPath $xpath): \PHPUnit\TextUI\XmlConfiguration\Logging\Logging + /** + * @throws Exception + */ + public function printerFile(): string { } -} -/** - * @internal This class is not covered by the backward compatibility promise for PHPUnit - * - * @phan-side-effect-free - */ -final class Variable -{ - public function __construct(string $name, $value, bool $force) + public function beStrictAboutChangesToGlobalState(): bool { } - public function name(): string + public function beStrictAboutOutputDuringTests(): bool { } - public function value() + public function beStrictAboutResourceUsageDuringSmallTests(): bool { } - public function force(): bool + public function beStrictAboutTestsThatDoNotTestAnything(): bool { } -} -/** - * @internal This class is not covered by the backward compatibility promise for PHPUnit - * - * @template-implements \Iterator - */ -final class ConstantCollectionIterator implements \Countable, \Iterator -{ - public function __construct(\PHPUnit\TextUI\XmlConfiguration\ConstantCollection $constants) + public function beStrictAboutTodoAnnotatedTests(): bool { } - public function count(): int + public function beStrictAboutCoversAnnotation(): bool { } - public function rewind(): void + public function enforceTimeLimit(): bool { } - public function valid(): bool + public function defaultTimeLimit(): int { } - public function key(): int + public function timeoutForSmallTests(): int { } - public function current(): \PHPUnit\TextUI\XmlConfiguration\Constant + public function timeoutForMediumTests(): int { } - public function next(): void + public function timeoutForLargeTests(): int { } -} -/** - * @internal This class is not covered by the backward compatibility promise for PHPUnit - * - * @phan-side-effect-free - * - * @template-implements \IteratorAggregate - */ -final class VariableCollection implements \Countable, \IteratorAggregate -{ /** - * @param Variable[] $variables + * @psalm-assert-if-true !null $this->defaultTestSuite */ - public static function fromArray(array $variables): self + public function hasDefaultTestSuite(): bool { } /** - * @return Variable[] + * @throws Exception */ - public function asArray(): array + public function defaultTestSuite(): string + { + } + public function executionOrder(): int + { + } + public function resolveDependencies(): bool + { + } + public function defectsFirst(): bool + { + } + public function backupGlobals(): bool + { + } + public function backupStaticAttributes(): bool { } - public function count(): int + public function registerMockObjectsFromTestArgumentsRecursively(): bool { } - public function getIterator(): \PHPUnit\TextUI\XmlConfiguration\VariableCollectionIterator + public function conflictBetweenPrinterClassAndTestdox(): bool { } } @@ -12162,42 +12220,24 @@ public function getIterator(): \PHPUnit\TextUI\XmlConfiguration\VariableCollecti * * @phan-side-effect-free */ -final class Php +final class TestDirectory { - public function __construct(\PHPUnit\TextUI\XmlConfiguration\DirectoryCollection $includePaths, \PHPUnit\TextUI\XmlConfiguration\IniSettingCollection $iniSettings, \PHPUnit\TextUI\XmlConfiguration\ConstantCollection $constants, \PHPUnit\TextUI\XmlConfiguration\VariableCollection $globalVariables, \PHPUnit\TextUI\XmlConfiguration\VariableCollection $envVariables, \PHPUnit\TextUI\XmlConfiguration\VariableCollection $postVariables, \PHPUnit\TextUI\XmlConfiguration\VariableCollection $getVariables, \PHPUnit\TextUI\XmlConfiguration\VariableCollection $cookieVariables, \PHPUnit\TextUI\XmlConfiguration\VariableCollection $serverVariables, \PHPUnit\TextUI\XmlConfiguration\VariableCollection $filesVariables, \PHPUnit\TextUI\XmlConfiguration\VariableCollection $requestVariables) - { - } - public function includePaths(): \PHPUnit\TextUI\XmlConfiguration\DirectoryCollection - { - } - public function iniSettings(): \PHPUnit\TextUI\XmlConfiguration\IniSettingCollection - { - } - public function constants(): \PHPUnit\TextUI\XmlConfiguration\ConstantCollection - { - } - public function globalVariables(): \PHPUnit\TextUI\XmlConfiguration\VariableCollection - { - } - public function envVariables(): \PHPUnit\TextUI\XmlConfiguration\VariableCollection - { - } - public function postVariables(): \PHPUnit\TextUI\XmlConfiguration\VariableCollection + public function __construct(string $path, string $prefix, string $suffix, string $phpVersion, \PHPUnit\Util\VersionComparisonOperator $phpVersionOperator) { } - public function getVariables(): \PHPUnit\TextUI\XmlConfiguration\VariableCollection + public function path(): string { } - public function cookieVariables(): \PHPUnit\TextUI\XmlConfiguration\VariableCollection + public function prefix(): string { } - public function serverVariables(): \PHPUnit\TextUI\XmlConfiguration\VariableCollection + public function suffix(): string { } - public function filesVariables(): \PHPUnit\TextUI\XmlConfiguration\VariableCollection + public function phpVersion(): string { } - public function requestVariables(): \PHPUnit\TextUI\XmlConfiguration\VariableCollection + public function phpVersionOperator(): \PHPUnit\Util\VersionComparisonOperator { } } @@ -12206,18 +12246,18 @@ public function requestVariables(): \PHPUnit\TextUI\XmlConfiguration\VariableCol * * @phan-side-effect-free * - * @template-implements \IteratorAggregate + * @template-implements \IteratorAggregate */ -final class IniSettingCollection implements \Countable, \IteratorAggregate +final class TestDirectoryCollection implements \Countable, \IteratorAggregate { /** - * @param IniSetting[] $iniSettings + * @param TestDirectory[] $directories */ - public static function fromArray(array $iniSettings): self + public static function fromArray(array $directories): self { } /** - * @return IniSetting[] + * @return TestDirectory[] */ public function asArray(): array { @@ -12225,18 +12265,21 @@ public function asArray(): array public function count(): int { } - public function getIterator(): \PHPUnit\TextUI\XmlConfiguration\IniSettingCollectionIterator + public function getIterator(): \PHPUnit\TextUI\XmlConfiguration\TestDirectoryCollectionIterator + { + } + public function isEmpty(): bool { } } /** * @internal This class is not covered by the backward compatibility promise for PHPUnit * - * @template-implements \Iterator + * @template-implements \Iterator */ -final class IniSettingCollectionIterator implements \Countable, \Iterator +final class TestDirectoryCollectionIterator implements \Countable, \Iterator { - public function __construct(\PHPUnit\TextUI\XmlConfiguration\IniSettingCollection $iniSettings) + public function __construct(\PHPUnit\TextUI\XmlConfiguration\TestDirectoryCollection $directories) { } public function count(): int @@ -12251,7 +12294,7 @@ public function valid(): bool public function key(): int { } - public function current(): \PHPUnit\TextUI\XmlConfiguration\IniSetting + public function current(): \PHPUnit\TextUI\XmlConfiguration\TestDirectory { } public function next(): void @@ -12261,29 +12304,20 @@ public function next(): void /** * @internal This class is not covered by the backward compatibility promise for PHPUnit * - * @template-implements \Iterator + * @phan-side-effect-free */ -final class VariableCollectionIterator implements \Countable, \Iterator +final class TestFile { - public function __construct(\PHPUnit\TextUI\XmlConfiguration\VariableCollection $variables) - { - } - public function count(): int - { - } - public function rewind(): void - { - } - public function valid(): bool + public function __construct(string $path, string $phpVersion, \PHPUnit\Util\VersionComparisonOperator $phpVersionOperator) { } - public function key(): int + public function path(): string { } - public function current(): \PHPUnit\TextUI\XmlConfiguration\Variable + public function phpVersion(): string { } - public function next(): void + public function phpVersionOperator(): \PHPUnit\Util\VersionComparisonOperator { } } @@ -12292,18 +12326,18 @@ public function next(): void * * @phan-side-effect-free * - * @template-implements \IteratorAggregate + * @template-implements \IteratorAggregate */ -final class ConstantCollection implements \Countable, \IteratorAggregate +final class TestFileCollection implements \Countable, \IteratorAggregate { /** - * @param Constant[] $constants + * @param TestFile[] $files */ - public static function fromArray(array $constants): self + public static function fromArray(array $files): self { } /** - * @return Constant[] + * @return TestFile[] */ public function asArray(): array { @@ -12311,33 +12345,39 @@ public function asArray(): array public function count(): int { } - public function getIterator(): \PHPUnit\TextUI\XmlConfiguration\ConstantCollectionIterator + public function getIterator(): \PHPUnit\TextUI\XmlConfiguration\TestFileCollectionIterator { } -} -/** - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final class PhpHandler -{ - public function handle(\PHPUnit\TextUI\XmlConfiguration\Php $configuration): void + public function isEmpty(): bool { } } /** * @internal This class is not covered by the backward compatibility promise for PHPUnit * - * @phan-side-effect-free + * @template-implements \Iterator */ -final class IniSetting +final class TestFileCollectionIterator implements \Countable, \Iterator { - public function __construct(string $name, string $value) + public function __construct(\PHPUnit\TextUI\XmlConfiguration\TestFileCollection $files) { } - public function name(): string + public function count(): int { } - public function value(): string + public function rewind(): void + { + } + public function valid(): bool + { + } + public function key(): int + { + } + public function current(): \PHPUnit\TextUI\XmlConfiguration\TestFile + { + } + public function next(): void { } } @@ -12346,66 +12386,63 @@ public function value(): string * * @phan-side-effect-free */ -final class Constant +final class TestSuite { - public function __construct(string $name, $value) + public function __construct(string $name, \PHPUnit\TextUI\XmlConfiguration\TestDirectoryCollection $directories, \PHPUnit\TextUI\XmlConfiguration\TestFileCollection $files, \PHPUnit\TextUI\XmlConfiguration\FileCollection $exclude) { } public function name(): string { } - public function value() + public function directories(): \PHPUnit\TextUI\XmlConfiguration\TestDirectoryCollection + { + } + public function files(): \PHPUnit\TextUI\XmlConfiguration\TestFileCollection + { + } + public function exclude(): \PHPUnit\TextUI\XmlConfiguration\FileCollection { } -} -/** - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final class Exception extends \RuntimeException implements \PHPUnit\Exception -{ } /** * @internal This class is not covered by the backward compatibility promise for PHPUnit * * @phan-side-effect-free * - * @template-implements \IteratorAggregate + * @template-implements \IteratorAggregate */ -final class GroupCollection implements \IteratorAggregate +final class TestSuiteCollection implements \Countable, \IteratorAggregate { /** - * @param Group[] $groups + * @param TestSuite[] $testSuites */ - public static function fromArray(array $groups): self + public static function fromArray(array $testSuites): self { } /** - * @return Group[] + * @return TestSuite[] */ public function asArray(): array { } - /** - * @return string[] - */ - public function asArrayOfStrings(): array + public function count(): int { } - public function isEmpty(): bool + public function getIterator(): \PHPUnit\TextUI\XmlConfiguration\TestSuiteCollectionIterator { } - public function getIterator(): \PHPUnit\TextUI\XmlConfiguration\GroupCollectionIterator + public function isEmpty(): bool { } } /** * @internal This class is not covered by the backward compatibility promise for PHPUnit * - * @template-implements \Iterator + * @template-implements \Iterator */ -final class GroupCollectionIterator implements \Countable, \Iterator +final class TestSuiteCollectionIterator implements \Countable, \Iterator { - public function __construct(\PHPUnit\TextUI\XmlConfiguration\GroupCollection $groups) + public function __construct(\PHPUnit\TextUI\XmlConfiguration\TestSuiteCollection $testSuites) { } public function count(): int @@ -12420,50 +12457,13 @@ public function valid(): bool public function key(): int { } - public function current(): \PHPUnit\TextUI\XmlConfiguration\Group + public function current(): \PHPUnit\TextUI\XmlConfiguration\TestSuite { } public function next(): void { } } -/** - * @internal This class is not covered by the backward compatibility promise for PHPUnit - * - * @phan-side-effect-free - */ -final class Group -{ - public function __construct(string $name) - { - } - public function name(): string - { - } -} -/** - * @internal This class is not covered by the backward compatibility promise for PHPUnit - * - * @phan-side-effect-free - */ -final class Groups -{ - public function __construct(\PHPUnit\TextUI\XmlConfiguration\GroupCollection $include, \PHPUnit\TextUI\XmlConfiguration\GroupCollection $exclude) - { - } - public function hasInclude(): bool - { - } - public function include(): \PHPUnit\TextUI\XmlConfiguration\GroupCollection - { - } - public function hasExclude(): bool - { - } - public function exclude(): \PHPUnit\TextUI\XmlConfiguration\GroupCollection - { - } -} namespace PHPUnit\TextUI\XmlConfiguration\CodeCoverage; /** @@ -12612,8 +12612,59 @@ public function map(\SebastianBergmann\CodeCoverage\Filter $filter, \PHPUnit\Tex { } } -namespace PHPUnit\TextUI\XmlConfiguration\CodeCoverage\Filter; - +namespace PHPUnit\TextUI\XmlConfiguration\CodeCoverage\Filter; + +/** + * @internal This class is not covered by the backward compatibility promise for PHPUnit + * + * @phan-side-effect-free + */ +final class Directory +{ + public function __construct(string $path, string $prefix, string $suffix, string $group) + { + } + public function path(): string + { + } + public function prefix(): string + { + } + public function suffix(): string + { + } + public function group(): string + { + } +} +/** + * @internal This class is not covered by the backward compatibility promise for PHPUnit + * + * @phan-side-effect-free + * + * @template-implements \IteratorAggregate + */ +final class DirectoryCollection implements \Countable, \IteratorAggregate +{ + /** + * @param Directory[] $directories + */ + public static function fromArray(array $directories): self + { + } + /** + * @return Directory[] + */ + public function asArray(): array + { + } + public function count(): int + { + } + public function getIterator(): \PHPUnit\TextUI\XmlConfiguration\CodeCoverage\Filter\DirectoryCollectionIterator + { + } +} /** * @internal This class is not covered by the backward compatibility promise for PHPUnit * @@ -12643,31 +12694,33 @@ public function next(): void { } } +namespace PHPUnit\TextUI\XmlConfiguration\CodeCoverage\Report; + /** * @internal This class is not covered by the backward compatibility promise for PHPUnit * * @phan-side-effect-free - * - * @template-implements \IteratorAggregate */ -final class DirectoryCollection implements \Countable, \IteratorAggregate +final class Clover { - /** - * @param Directory[] $directories - */ - public static function fromArray(array $directories): self + public function __construct(\PHPUnit\TextUI\XmlConfiguration\File $target) { } - /** - * @return Directory[] - */ - public function asArray(): array + public function target(): \PHPUnit\TextUI\XmlConfiguration\File { } - public function count(): int +} +/** + * @internal This class is not covered by the backward compatibility promise for PHPUnit + * + * @phan-side-effect-free + */ +final class Cobertura +{ + public function __construct(\PHPUnit\TextUI\XmlConfiguration\File $target) { } - public function getIterator(): \PHPUnit\TextUI\XmlConfiguration\CodeCoverage\Filter\DirectoryCollectionIterator + public function target(): \PHPUnit\TextUI\XmlConfiguration\File { } } @@ -12676,32 +12729,44 @@ public function getIterator(): \PHPUnit\TextUI\XmlConfiguration\CodeCoverage\Fil * * @phan-side-effect-free */ -final class Directory +final class Crap4j { - public function __construct(string $path, string $prefix, string $suffix, string $group) + public function __construct(\PHPUnit\TextUI\XmlConfiguration\File $target, int $threshold) { } - public function path(): string + public function target(): \PHPUnit\TextUI\XmlConfiguration\File { } - public function prefix(): string + public function threshold(): int { } - public function suffix(): string +} +/** + * @internal This class is not covered by the backward compatibility promise for PHPUnit + * + * @phan-side-effect-free + */ +final class Html +{ + public function __construct(\PHPUnit\TextUI\XmlConfiguration\Directory $target, int $lowUpperBound, int $highLowerBound) { } - public function group(): string + public function target(): \PHPUnit\TextUI\XmlConfiguration\Directory + { + } + public function lowUpperBound(): int + { + } + public function highLowerBound(): int { } } -namespace PHPUnit\TextUI\XmlConfiguration\CodeCoverage\Report; - /** * @internal This class is not covered by the backward compatibility promise for PHPUnit * * @phan-side-effect-free */ -final class Clover +final class Php { public function __construct(\PHPUnit\TextUI\XmlConfiguration\File $target) { @@ -12744,12 +12809,14 @@ public function target(): \PHPUnit\TextUI\XmlConfiguration\Directory { } } +namespace PHPUnit\TextUI\XmlConfiguration\Logging; + /** * @internal This class is not covered by the backward compatibility promise for PHPUnit * * @phan-side-effect-free */ -final class Php +final class Junit { public function __construct(\PHPUnit\TextUI\XmlConfiguration\File $target) { @@ -12763,18 +12830,45 @@ public function target(): \PHPUnit\TextUI\XmlConfiguration\File * * @phan-side-effect-free */ -final class Html +final class Logging { - public function __construct(\PHPUnit\TextUI\XmlConfiguration\Directory $target, int $lowUpperBound, int $highLowerBound) + public function __construct(?\PHPUnit\TextUI\XmlConfiguration\Logging\Junit $junit, ?\PHPUnit\TextUI\XmlConfiguration\Logging\Text $text, ?\PHPUnit\TextUI\XmlConfiguration\Logging\TeamCity $teamCity, ?\PHPUnit\TextUI\XmlConfiguration\Logging\TestDox\Html $testDoxHtml, ?\PHPUnit\TextUI\XmlConfiguration\Logging\TestDox\Text $testDoxText, ?\PHPUnit\TextUI\XmlConfiguration\Logging\TestDox\Xml $testDoxXml) { } - public function target(): \PHPUnit\TextUI\XmlConfiguration\Directory + public function hasJunit(): bool { } - public function lowUpperBound(): int + public function junit(): \PHPUnit\TextUI\XmlConfiguration\Logging\Junit { } - public function highLowerBound(): int + public function hasText(): bool + { + } + public function text(): \PHPUnit\TextUI\XmlConfiguration\Logging\Text + { + } + public function hasTeamCity(): bool + { + } + public function teamCity(): \PHPUnit\TextUI\XmlConfiguration\Logging\TeamCity + { + } + public function hasTestDoxHtml(): bool + { + } + public function testDoxHtml(): \PHPUnit\TextUI\XmlConfiguration\Logging\TestDox\Html + { + } + public function hasTestDoxText(): bool + { + } + public function testDoxText(): \PHPUnit\TextUI\XmlConfiguration\Logging\TestDox\Text + { + } + public function hasTestDoxXml(): bool + { + } + public function testDoxXml(): \PHPUnit\TextUI\XmlConfiguration\Logging\TestDox\Xml { } } @@ -12783,7 +12877,7 @@ public function highLowerBound(): int * * @phan-side-effect-free */ -final class Cobertura +final class TeamCity { public function __construct(\PHPUnit\TextUI\XmlConfiguration\File $target) { @@ -12797,26 +12891,23 @@ public function target(): \PHPUnit\TextUI\XmlConfiguration\File * * @phan-side-effect-free */ -final class Crap4j +final class Text { - public function __construct(\PHPUnit\TextUI\XmlConfiguration\File $target, int $threshold) + public function __construct(\PHPUnit\TextUI\XmlConfiguration\File $target) { } public function target(): \PHPUnit\TextUI\XmlConfiguration\File { } - public function threshold(): int - { - } } -namespace PHPUnit\TextUI\XmlConfiguration\Logging; +namespace PHPUnit\TextUI\XmlConfiguration\Logging\TestDox; /** * @internal This class is not covered by the backward compatibility promise for PHPUnit * * @phan-side-effect-free */ -final class TeamCity +final class Html { public function __construct(\PHPUnit\TextUI\XmlConfiguration\File $target) { @@ -12844,7 +12935,7 @@ public function target(): \PHPUnit\TextUI\XmlConfiguration\File * * @phan-side-effect-free */ -final class Junit +final class Xml { public function __construct(\PHPUnit\TextUI\XmlConfiguration\File $target) { @@ -12853,204 +12944,279 @@ public function target(): \PHPUnit\TextUI\XmlConfiguration\File { } } +namespace PHPUnit\Util; + /** - * @internal This class is not covered by the backward compatibility promise for PHPUnit + * @deprecated Use ExcludeList instead * - * @phan-side-effect-free + * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit */ -final class Logging +final class Blacklist { - public function __construct(?\PHPUnit\TextUI\XmlConfiguration\Logging\Junit $junit, ?\PHPUnit\TextUI\XmlConfiguration\Logging\Text $text, ?\PHPUnit\TextUI\XmlConfiguration\Logging\TeamCity $teamCity, ?\PHPUnit\TextUI\XmlConfiguration\Logging\TestDox\Html $testDoxHtml, ?\PHPUnit\TextUI\XmlConfiguration\Logging\TestDox\Text $testDoxText, ?\PHPUnit\TextUI\XmlConfiguration\Logging\TestDox\Xml $testDoxXml) + public static function addDirectory(string $directory): void { } - public function hasJunit(): bool + /** + * @throws Exception + * + * @return string[] + */ + public function getBlacklistedDirectories(): array { } - public function junit(): \PHPUnit\TextUI\XmlConfiguration\Logging\Junit + /** + * @throws Exception + */ + public function isBlacklisted(string $file): bool { } - public function hasText(): bool +} +/** + * @internal This class is not covered by the backward compatibility promise for PHPUnit + */ +final class Cloner +{ + /** + * @phan-template OriginalType + * + * @phan-param OriginalType $original + * + * @phan-return OriginalType + */ + public static function clone(object $original): object { } - public function text(): \PHPUnit\TextUI\XmlConfiguration\Logging\Text +} +/** + * @internal This class is not covered by the backward compatibility promise for PHPUnit + */ +final class Color +{ + public static function colorize(string $color, string $buffer): string { } - public function hasTeamCity(): bool + public static function colorizePath(string $path, ?string $prevPath = null, bool $colorizeFilename = false): string { } - public function teamCity(): \PHPUnit\TextUI\XmlConfiguration\Logging\TeamCity + public static function dim(string $buffer): string { } - public function hasTestDoxHtml(): bool + public static function visualizeWhitespace(string $buffer, bool $visualizeEOL = false): string { } - public function testDoxHtml(): \PHPUnit\TextUI\XmlConfiguration\Logging\TestDox\Html +} +/** + * @internal This class is not covered by the backward compatibility promise for PHPUnit + */ +final class ErrorHandler +{ + public static function invokeIgnoringWarnings(callable $callable) { } - public function hasTestDoxText(): bool + public function __construct(bool $convertDeprecationsToExceptions, bool $convertErrorsToExceptions, bool $convertNoticesToExceptions, bool $convertWarningsToExceptions) { } - public function testDoxText(): \PHPUnit\TextUI\XmlConfiguration\Logging\TestDox\Text + public function __invoke(int $errorNumber, string $errorString, string $errorFile, int $errorLine): bool { } - public function hasTestDoxXml(): bool + public function register(): void { } - public function testDoxXml(): \PHPUnit\TextUI\XmlConfiguration\Logging\TestDox\Xml + public function unregister(): void { } } -namespace PHPUnit\TextUI\XmlConfiguration\Logging\TestDox; - /** * @internal This class is not covered by the backward compatibility promise for PHPUnit - * - * @phan-side-effect-free */ -final class Text +final class Exception extends \RuntimeException implements \PHPUnit\Exception { - public function __construct(\PHPUnit\TextUI\XmlConfiguration\File $target) +} +/** + * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit + */ +final class ExcludeList +{ + public static function addDirectory(string $directory): void { } - public function target(): \PHPUnit\TextUI\XmlConfiguration\File + /** + * @throws Exception + * + * @return string[] + */ + public function getExcludedDirectories(): array + { + } + /** + * @throws Exception + */ + public function isExcluded(string $file): bool { } } /** * @internal This class is not covered by the backward compatibility promise for PHPUnit - * - * @phan-side-effect-free */ -final class Xml +final class FileLoader { - public function __construct(\PHPUnit\TextUI\XmlConfiguration\File $target) + /** + * Checks if a PHP sourcecode file is readable. The sourcecode file is loaded through the load() method. + * + * As a fallback, PHP looks in the directory of the file executing the stream_resolve_include_path function. + * We do not want to load the Test.php file here, so skip it if it found that. + * PHP prioritizes the include_path setting, so if the current directory is in there, it will first look in the + * current working directory. + * + * @throws Exception + */ + public static function checkAndLoad(string $filename): string { } - public function target(): \PHPUnit\TextUI\XmlConfiguration\File + /** + * Loads a PHP sourcefile. + */ + public static function load(string $filename): void { } } /** * @internal This class is not covered by the backward compatibility promise for PHPUnit - * - * @phan-side-effect-free */ -final class Html +final class Filesystem { - public function __construct(\PHPUnit\TextUI\XmlConfiguration\File $target) + /** + * Maps class names to source file names. + * + * - PEAR CS: Foo_Bar_Baz -> Foo/Bar/Baz.php + * - Namespace: Foo\Bar\Baz -> Foo/Bar/Baz.php + */ + public static function classNameToFilename(string $className): string { } - public function target(): \PHPUnit\TextUI\XmlConfiguration\File + public static function createDirectory(string $directory): bool { } } -namespace PHPUnit\Util; - /** * @internal This class is not covered by the backward compatibility promise for PHPUnit */ -final class XmlTestListRenderer +final class Filter { /** - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * @throws \PHPUnit\Framework\Exception */ - public function render(\PHPUnit\Framework\TestSuite $suite): string + public static function getFilteredStacktrace(\Throwable $t): string { } } /** * @internal This class is not covered by the backward compatibility promise for PHPUnit */ -final class Color +final class GlobalState { - public static function colorize(string $color, string $buffer): string + /** + * @throws Exception + */ + public static function getIncludedFilesAsString(): string { } - public static function colorizePath(string $path, ?string $prevPath = null, bool $colorizeFilename = false): string + /** + * @param string[] $files + * + * @throws Exception + */ + public static function processIncludedFilesAsString(array $files): string { } - public static function dim(string $buffer): string + public static function getIniSettingsAsString(): string { } - public static function visualizeWhitespace(string $buffer, bool $visualizeEOL = false): string + public static function getConstantsAsString(): string + { + } + public static function getGlobalsAsString(): string { } } /** * @internal This class is not covered by the backward compatibility promise for PHPUnit */ -final class Type +final class InvalidDataSetException extends \RuntimeException implements \PHPUnit\Exception { - public static function isType(string $type): bool - { - } } /** * @internal This class is not covered by the backward compatibility promise for PHPUnit */ -final class Xml +final class Json { /** - * @deprecated Only used by assertEqualXMLStructure() + * Prettify json string. + * + * @throws \PHPUnit\Framework\Exception */ - public static function import(\DOMElement $element): \DOMElement + public static function prettify(string $json): string { } /** - * @deprecated Only used by assertEqualXMLStructure() + * To allow comparison of JSON strings, first process them into a consistent + * format so that they can be compared as strings. + * + * @return array ($error, $canonicalized_json) The $error parameter is used + * to indicate an error decoding the json. This is used to avoid ambiguity + * with JSON strings consisting entirely of 'null' or 'false'. */ - public static function removeCharacterDataNodes(\DOMNode $node): void + public static function canonicalize(string $json): array { } +} +/** + * @internal This class is not covered by the backward compatibility promise for PHPUnit + */ +class Printer +{ /** - * Escapes a string for the use in XML documents. - * - * Any Unicode character is allowed, excluding the surrogate blocks, FFFE, - * and FFFF (not even as character reference). + * @param null|resource|string $out * - * @see https://www.w3.org/TR/xml/#charsets + * @throws Exception */ - public static function prepareString(string $string): string + public function __construct($out = null) { } - /** - * "Convert" a DOMElement object into a PHP variable. - */ - public static function xmlToVariable(\DOMElement $element) + public function write(string $buffer): void + { + } + public function flush(): void { } } /** * @internal This class is not covered by the backward compatibility promise for PHPUnit */ -final class InvalidDataSetException extends \RuntimeException implements \PHPUnit\Exception -{ -} -/** - * @internal This class is not covered by the backward compatibility promise for PHPUnit - * - * @phan-side-effect-free - */ -final class VersionComparisonOperator +final class Reflection { - public function __construct(string $operator) + /** + * @phan-return list<\ReflectionMethod> + */ + public function publicMethodsInTestClass(\ReflectionClass $class): array { } /** - * @return '!='|'<'|'<='|'<>'|'='|'=='|'>'|'>='|'eq'|'ge'|'gt'|'le'|'lt'|'ne' + * @phan-return list<\ReflectionMethod> */ - public function asString(): string + public function methodsInTestClass(\ReflectionClass $class): array { } } /** * @internal This class is not covered by the backward compatibility promise for PHPUnit - * - * @deprecated */ -final class XdebugFilterScriptGenerator +final class RegularExpression { - public function generate(\PHPUnit\TextUI\XmlConfiguration\CodeCoverage\CodeCoverage $filter): string + /** + * @return false|int + */ + public static function safeMatch(string $pattern, string $subject) { } } @@ -13191,257 +13357,91 @@ public static function isTestMethod(\ReflectionMethod $method): bool /** * @internal This class is not covered by the backward compatibility promise for PHPUnit */ -final class ErrorHandler -{ - public static function invokeIgnoringWarnings(callable $callable) - { - } - public function __construct(bool $convertDeprecationsToExceptions, bool $convertErrorsToExceptions, bool $convertNoticesToExceptions, bool $convertWarningsToExceptions) - { - } - public function __invoke(int $errorNumber, string $errorString, string $errorFile, int $errorLine): bool - { - } - public function register(): void - { - } - public function unregister(): void - { - } -} -/** - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final class Reflection -{ - /** - * @phan-return list<\ReflectionMethod> - */ - public function publicMethodsInTestClass(\ReflectionClass $class): array - { - } - /** - * @phan-return list<\ReflectionMethod> - */ - public function methodsInTestClass(\ReflectionClass $class): array - { - } -} -/** - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final class Filesystem -{ - /** - * Maps class names to source file names. - * - * - PEAR CS: Foo_Bar_Baz -> Foo/Bar/Baz.php - * - Namespace: Foo\Bar\Baz -> Foo/Bar/Baz.php - */ - public static function classNameToFilename(string $className): string - { - } - public static function createDirectory(string $directory): bool - { - } -} -/** - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final class RegularExpression -{ - /** - * @return false|int - */ - public static function safeMatch(string $pattern, string $subject) - { - } -} -/** - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -class Printer -{ - /** - * @param null|resource|string $out - * - * @throws Exception - */ - public function __construct($out = null) - { - } - public function write(string $buffer): void - { - } - public function flush(): void - { - } -} -/** - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final class Exception extends \RuntimeException implements \PHPUnit\Exception -{ -} -/** - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final class Filter -{ - /** - * @throws \PHPUnit\Framework\Exception - */ - public static function getFilteredStacktrace(\Throwable $t): string - { - } -} -/** - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final class FileLoader +final class TextTestListRenderer { /** - * Checks if a PHP sourcecode file is readable. The sourcecode file is loaded through the load() method. - * - * As a fallback, PHP looks in the directory of the file executing the stream_resolve_include_path function. - * We do not want to load the Test.php file here, so skip it if it found that. - * PHP prioritizes the include_path setting, so if the current directory is in there, it will first look in the - * current working directory. - * - * @throws Exception - */ - public static function checkAndLoad(string $filename): string - { - } - /** - * Loads a PHP sourcefile. + * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException */ - public static function load(string $filename): void + public function render(\PHPUnit\Framework\TestSuite $suite): string { } } /** * @internal This class is not covered by the backward compatibility promise for PHPUnit */ -final class Json +final class Type { - /** - * Prettify json string. - * - * @throws \PHPUnit\Framework\Exception - */ - public static function prettify(string $json): string - { - } - /** - * To allow comparison of JSON strings, first process them into a consistent - * format so that they can be compared as strings. - * - * @return array ($error, $canonicalized_json) The $error parameter is used - * to indicate an error decoding the json. This is used to avoid ambiguity - * with JSON strings consisting entirely of 'null' or 'false'. - */ - public static function canonicalize(string $json): array + public static function isType(string $type): bool { } } /** * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final class Cloner -{ - /** - * @phan-template OriginalType - * - * @phan-param OriginalType $original - * - * @phan-return OriginalType - */ - public static function clone(object $original): object - { - } -} -/** - * @deprecated Use ExcludeList instead * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit + * @phan-side-effect-free */ -final class Blacklist +final class VersionComparisonOperator { - public static function addDirectory(string $directory): void + public function __construct(string $operator) { } /** - * @throws Exception - * - * @return string[] + * @return '!='|'<'|'<='|'<>'|'='|'=='|'>'|'>='|'eq'|'ge'|'gt'|'le'|'lt'|'ne' */ - public function getBlacklistedDirectories(): array + public function asString(): string { } - /** - * @throws Exception - */ - public function isBlacklisted(string $file): bool +} +/** + * @internal This class is not covered by the backward compatibility promise for PHPUnit + * + * @deprecated + */ +final class XdebugFilterScriptGenerator +{ + public function generate(\PHPUnit\TextUI\XmlConfiguration\CodeCoverage\CodeCoverage $filter): string { } } /** * @internal This class is not covered by the backward compatibility promise for PHPUnit */ -final class GlobalState +final class Xml { /** - * @throws Exception + * @deprecated Only used by assertEqualXMLStructure() */ - public static function getIncludedFilesAsString(): string + public static function import(\DOMElement $element): \DOMElement { } /** - * @param string[] $files - * - * @throws Exception + * @deprecated Only used by assertEqualXMLStructure() */ - public static function processIncludedFilesAsString(array $files): string - { - } - public static function getIniSettingsAsString(): string - { - } - public static function getConstantsAsString(): string - { - } - public static function getGlobalsAsString(): string - { - } -} -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - */ -final class ExcludeList -{ - public static function addDirectory(string $directory): void + public static function removeCharacterDataNodes(\DOMNode $node): void { } /** - * @throws Exception + * Escapes a string for the use in XML documents. * - * @return string[] + * Any Unicode character is allowed, excluding the surrogate blocks, FFFE, + * and FFFF (not even as character reference). + * + * @see https://www.w3.org/TR/xml/#charsets */ - public function getExcludedDirectories(): array + public static function prepareString(string $string): string { } /** - * @throws Exception + * "Convert" a DOMElement object into a PHP variable. */ - public function isExcluded(string $file): bool + public static function xmlToVariable(\DOMElement $element) { } } /** * @internal This class is not covered by the backward compatibility promise for PHPUnit */ -final class TextTestListRenderer +final class XmlTestListRenderer { /** * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException @@ -13452,34 +13452,6 @@ public function render(\PHPUnit\Framework\TestSuite $suite): string } namespace PHPUnit\Util\Annotation; -/** - * Reflection information, and therefore DocBlock information, is static within - * a single PHP process. It is therefore okay to use a Singleton registry here. - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final class Registry -{ - public static function getInstance(): self - { - } - /** - * @throws \PHPUnit\Util\Exception - * - * @phan-param class-string $class - */ - public function forClassName(string $class): \PHPUnit\Util\Annotation\DocBlock - { - } - /** - * @throws \PHPUnit\Util\Exception - * - * @phan-param class-string $classInHierarchy - */ - public function forMethod(string $classInHierarchy, string $method): \PHPUnit\Util\Annotation\DocBlock - { - } -} /** * This is an abstraction around a PHPUnit-specific docBlock, * allowing us to ask meaningful questions about a specific @@ -13553,14 +13525,51 @@ public function isToBeExecutedAsPostCondition(): bool { } } +/** + * Reflection information, and therefore DocBlock information, is static within + * a single PHP process. It is therefore okay to use a Singleton registry here. + * + * @internal This class is not covered by the backward compatibility promise for PHPUnit + */ +final class Registry +{ + public static function getInstance(): self + { + } + /** + * @throws \PHPUnit\Util\Exception + * + * @phan-param class-string $class + */ + public function forClassName(string $class): \PHPUnit\Util\Annotation\DocBlock + { + } + /** + * @throws \PHPUnit\Util\Exception + * + * @phan-param class-string $classInHierarchy + */ + public function forMethod(string $classInHierarchy, string $method): \PHPUnit\Util\Annotation\DocBlock + { + } +} namespace PHPUnit\Util\Log; /** * @internal This class is not covered by the backward compatibility promise for PHPUnit */ -final class TeamCity extends \PHPUnit\TextUI\DefaultResultPrinter +final class JUnit extends \PHPUnit\Util\Printer implements \PHPUnit\Framework\TestListener { - public function printResult(\PHPUnit\Framework\TestResult $result): void + /** + * @param null|mixed $out + */ + public function __construct($out = null, bool $reportRiskyTests = false) + { + } + /** + * Flush buffer and close output. + */ + public function flush(): void { } /** @@ -13599,9 +13608,6 @@ public function addRiskyTest(\PHPUnit\Framework\Test $test, \Throwable $t, float public function addSkippedTest(\PHPUnit\Framework\Test $test, \Throwable $t, float $time): void { } - public function printIgnoredTest(string $testName, \Throwable $t, float $time): void - { - } /** * A testsuite started. */ @@ -13626,22 +13632,19 @@ public function startTest(\PHPUnit\Framework\Test $test): void public function endTest(\PHPUnit\Framework\Test $test, float $time): void { } + /** + * Returns the XML as a string. + */ + public function getXML(): string + { + } } /** * @internal This class is not covered by the backward compatibility promise for PHPUnit */ -final class JUnit extends \PHPUnit\Util\Printer implements \PHPUnit\Framework\TestListener +final class TeamCity extends \PHPUnit\TextUI\DefaultResultPrinter { - /** - * @param null|mixed $out - */ - public function __construct($out = null, bool $reportRiskyTests = false) - { - } - /** - * Flush buffer and close output. - */ - public function flush(): void + public function printResult(\PHPUnit\Framework\TestResult $result): void { } /** @@ -13680,6 +13683,9 @@ public function addRiskyTest(\PHPUnit\Framework\Test $test, \Throwable $t, float public function addSkippedTest(\PHPUnit\Framework\Test $test, \Throwable $t, float $time): void { } + public function printIgnoredTest(string $testName, \Throwable $t, float $time): void + { + } /** * A testsuite started. */ @@ -13704,59 +13710,9 @@ public function startTest(\PHPUnit\Framework\Test $test): void public function endTest(\PHPUnit\Framework\Test $test, float $time): void { } - /** - * Returns the XML as a string. - */ - public function getXML(): string - { - } } namespace PHPUnit\Util\PHP; -/** - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -class DefaultPhpProcess extends \PHPUnit\Util\PHP\AbstractPhpProcess -{ - /** - * @var string - */ - protected $tempFile; - /** - * Runs a single job (PHP code) using a separate PHP process. - * - * @throws \PHPUnit\Framework\Exception - */ - public function runJob(string $job, array $settings = []): array - { - } - /** - * Returns an array of file handles to be used in place of pipes. - */ - protected function getHandles(): array - { - } - /** - * Handles creating the child process and returning the STDOUT and STDERR. - * - * @throws \PHPUnit\Framework\Exception - */ - protected function runProcess(string $job, array $settings): array - { - } - /** - * @param resource $pipe - */ - protected function process($pipe, string $job): void - { - } - protected function cleanup(): void - { - } - protected function useTemporaryFile(): bool - { - } -} /** * @internal This class is not covered by the backward compatibility promise for PHPUnit */ @@ -13839,42 +13795,86 @@ public function setEnv(array $env): void { } /** - * Returns the array of environment variables to start the child process with. + * Returns the array of environment variables to start the child process with. + */ + public function getEnv(): array + { + } + /** + * Sets the amount of seconds to wait before timing out. + */ + public function setTimeout(int $timeout): void + { + } + /** + * Returns the amount of seconds to wait before timing out. + */ + public function getTimeout(): int + { + } + /** + * Runs a single test in a separate PHP process. + * + * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + */ + public function runTestJob(string $job, \PHPUnit\Framework\Test $test, \PHPUnit\Framework\TestResult $result, string $processResultFile): void + { + } + /** + * Returns the command based into the configurations. + */ + public function getCommand(array $settings, ?string $file = null): string + { + } + /** + * Runs a single job (PHP code) using a separate PHP process. + */ + abstract public function runJob(string $job, array $settings = []): array; + protected function settingsToParameters(array $settings): string + { + } +} +/** + * @internal This class is not covered by the backward compatibility promise for PHPUnit + */ +class DefaultPhpProcess extends \PHPUnit\Util\PHP\AbstractPhpProcess +{ + /** + * @var string */ - public function getEnv(): array - { - } + protected $tempFile; /** - * Sets the amount of seconds to wait before timing out. + * Runs a single job (PHP code) using a separate PHP process. + * + * @throws \PHPUnit\Framework\Exception */ - public function setTimeout(int $timeout): void + public function runJob(string $job, array $settings = []): array { } /** - * Returns the amount of seconds to wait before timing out. + * Returns an array of file handles to be used in place of pipes. */ - public function getTimeout(): int + protected function getHandles(): array { } /** - * Runs a single test in a separate PHP process. + * Handles creating the child process and returning the STDOUT and STDERR. * - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * @throws \PHPUnit\Framework\Exception */ - public function runTestJob(string $job, \PHPUnit\Framework\Test $test, \PHPUnit\Framework\TestResult $result, string $processResultFile): void + protected function runProcess(string $job, array $settings): array { } /** - * Returns the command based into the configurations. + * @param resource $pipe */ - public function getCommand(array $settings, ?string $file = null): string + protected function process($pipe, string $job): void { } - /** - * Runs a single job (PHP code) using a separate PHP process. - */ - abstract public function runJob(string $job, array $settings = []): array; - protected function settingsToParameters(array $settings): string + protected function cleanup(): void + { + } + protected function useTemporaryFile(): bool { } } @@ -13948,6 +13948,15 @@ protected function undrawSpinner(): void { } } +/** + * @internal This class is not covered by the backward compatibility promise for PHPUnit + */ +final class HtmlResultPrinter extends \PHPUnit\Util\TestDox\ResultPrinter +{ + public function printResult(\PHPUnit\Framework\TestResult $result): void + { + } +} /** * @internal This class is not covered by the backward compatibility promise for PHPUnit */ @@ -13980,97 +13989,6 @@ public function prettifyTestMethod(string $name): string { } } -/** - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final class XmlResultPrinter extends \PHPUnit\Util\Printer implements \PHPUnit\Framework\TestListener -{ - /** - * @param resource|string $out - * - * @throws \PHPUnit\Framework\Exception - */ - public function __construct($out = null) - { - } - /** - * Flush buffer and close output. - */ - public function flush(): void - { - } - /** - * An error occurred. - */ - public function addError(\PHPUnit\Framework\Test $test, \Throwable $t, float $time): void - { - } - /** - * A warning occurred. - */ - public function addWarning(\PHPUnit\Framework\Test $test, \PHPUnit\Framework\Warning $e, float $time): void - { - } - /** - * A failure occurred. - */ - public function addFailure(\PHPUnit\Framework\Test $test, \PHPUnit\Framework\AssertionFailedError $e, float $time): void - { - } - /** - * Incomplete test. - */ - public function addIncompleteTest(\PHPUnit\Framework\Test $test, \Throwable $t, float $time): void - { - } - /** - * Risky test. - */ - public function addRiskyTest(\PHPUnit\Framework\Test $test, \Throwable $t, float $time): void - { - } - /** - * Skipped test. - */ - public function addSkippedTest(\PHPUnit\Framework\Test $test, \Throwable $t, float $time): void - { - } - /** - * A test suite started. - */ - public function startTestSuite(\PHPUnit\Framework\TestSuite $suite): void - { - } - /** - * A test suite ended. - */ - public function endTestSuite(\PHPUnit\Framework\TestSuite $suite): void - { - } - /** - * A test started. - */ - public function startTest(\PHPUnit\Framework\Test $test): void - { - } - /** - * A test ended. - * - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - */ - public function endTest(\PHPUnit\Framework\Test $test, float $time): void - { - } -} -/** - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final class HtmlResultPrinter extends \PHPUnit\Util\TestDox\ResultPrinter -{ - public function printResult(\PHPUnit\Framework\TestResult $result): void - { - } -} /** * @internal This class is not covered by the backward compatibility promise for PHPUnit */ @@ -14234,15 +14152,6 @@ protected function endRun(): void { } } -/** - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final class TextResultPrinter extends \PHPUnit\Util\TestDox\ResultPrinter -{ - public function printResult(\PHPUnit\Framework\TestResult $result): void - { - } -} /** * @internal This class is not covered by the backward compatibility promise for PHPUnit */ @@ -14402,67 +14311,148 @@ protected function prefixLines(string $prefix, string $message): string { } } -namespace PHPUnit\Util\Xml; - /** * @internal This class is not covered by the backward compatibility promise for PHPUnit */ -final class Loader +final class TextResultPrinter extends \PHPUnit\Util\TestDox\ResultPrinter +{ + public function printResult(\PHPUnit\Framework\TestResult $result): void + { + } +} +/** + * @internal This class is not covered by the backward compatibility promise for PHPUnit + */ +final class XmlResultPrinter extends \PHPUnit\Util\Printer implements \PHPUnit\Framework\TestListener { /** - * @throws Exception + * @param resource|string $out + * + * @throws \PHPUnit\Framework\Exception */ - public function loadFile(string $filename, bool $isHtml = false, bool $xinclude = false, bool $strict = false): \DOMDocument + public function __construct($out = null) { } /** - * @throws Exception + * Flush buffer and close output. */ - public function load(string $actual, bool $isHtml = false, string $filename = '', bool $xinclude = false, bool $strict = false): \DOMDocument + public function flush(): void + { + } + /** + * An error occurred. + */ + public function addError(\PHPUnit\Framework\Test $test, \Throwable $t, float $time): void + { + } + /** + * A warning occurred. + */ + public function addWarning(\PHPUnit\Framework\Test $test, \PHPUnit\Framework\Warning $e, float $time): void + { + } + /** + * A failure occurred. + */ + public function addFailure(\PHPUnit\Framework\Test $test, \PHPUnit\Framework\AssertionFailedError $e, float $time): void + { + } + /** + * Incomplete test. + */ + public function addIncompleteTest(\PHPUnit\Framework\Test $test, \Throwable $t, float $time): void + { + } + /** + * Risky test. + */ + public function addRiskyTest(\PHPUnit\Framework\Test $test, \Throwable $t, float $time): void + { + } + /** + * Skipped test. + */ + public function addSkippedTest(\PHPUnit\Framework\Test $test, \Throwable $t, float $time): void + { + } + /** + * A test suite started. + */ + public function startTestSuite(\PHPUnit\Framework\TestSuite $suite): void + { + } + /** + * A test suite ended. + */ + public function endTestSuite(\PHPUnit\Framework\TestSuite $suite): void + { + } + /** + * A test started. + */ + public function startTest(\PHPUnit\Framework\Test $test): void { } + /** + * A test ended. + * + * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + */ + public function endTest(\PHPUnit\Framework\Test $test, float $time): void + { + } +} +namespace PHPUnit\Util\Xml; + +/** + * @internal This class is not covered by the backward compatibility promise for PHPUnit + */ +final class Exception extends \RuntimeException implements \PHPUnit\Exception +{ } /** * @internal This class is not covered by the backward compatibility promise for PHPUnit * * @phan-side-effect-free */ -final class SuccessfulSchemaDetectionResult extends \PHPUnit\Util\Xml\SchemaDetectionResult +final class FailedSchemaDetectionResult extends \PHPUnit\Util\Xml\SchemaDetectionResult +{ +} +/** + * @internal This class is not covered by the backward compatibility promise for PHPUnit + */ +final class Loader { /** - * @phan-param non-empty-string $version - */ - public function __construct(string $version) - { - } - /** - * @psalm-assert-if-true SuccessfulSchemaDetectionResult $this + * @throws Exception */ - public function detected(): bool + public function loadFile(string $filename, bool $isHtml = false, bool $xinclude = false, bool $strict = false): \DOMDocument { } /** - * @phan-return non-empty-string + * @throws Exception */ - public function version(): string + public function load(string $actual, bool $isHtml = false, string $filename = '', bool $xinclude = false, bool $strict = false): \DOMDocument { } } /** * @internal This class is not covered by the backward compatibility promise for PHPUnit + * + * @phan-side-effect-free */ -final class SchemaFinder +abstract class SchemaDetectionResult { /** - * @phan-return non-empty-list + * @psalm-assert-if-true SuccessfulSchemaDetectionResult $this */ - public function available(): array + public function detected(): bool { } /** * @throws Exception */ - public function find(string $version): string + public function version(): string { } } @@ -14480,36 +14470,19 @@ public function detect(string $filename): \PHPUnit\Util\Xml\SchemaDetectionResul } /** * @internal This class is not covered by the backward compatibility promise for PHPUnit - * - * @phan-side-effect-free */ -final class ValidationResult +final class SchemaFinder { /** - * @phan-param array $errors + * @phan-return non-empty-list */ - public static function fromArray(array $errors): self - { - } - public function hasValidationErrors(): bool - { - } - public function asString(): string + public function available(): array { } -} -/** - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final class Exception extends \RuntimeException implements \PHPUnit\Exception -{ -} -/** - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final class Validator -{ - public function validate(\DOMDocument $document, string $xsdFilename): \PHPUnit\Util\Xml\ValidationResult + /** + * @throws Exception + */ + public function find(string $version): string { } } @@ -14535,8 +14508,14 @@ public function getIterator(): \ArrayIterator * * @phan-side-effect-free */ -abstract class SchemaDetectionResult +final class SuccessfulSchemaDetectionResult extends \PHPUnit\Util\Xml\SchemaDetectionResult { + /** + * @phan-param non-empty-string $version + */ + public function __construct(string $version) + { + } /** * @psalm-assert-if-true SuccessfulSchemaDetectionResult $this */ @@ -14544,7 +14523,7 @@ public function detected(): bool { } /** - * @throws Exception + * @phan-return non-empty-string */ public function version(): string { @@ -14555,49 +14534,43 @@ public function version(): string * * @phan-side-effect-free */ -final class FailedSchemaDetectionResult extends \PHPUnit\Util\Xml\SchemaDetectionResult -{ -} -namespace SebastianBergmann; - -final class Version +final class ValidationResult { - public function __construct(string $release, string $path) + /** + * @phan-param array $errors + */ + public static function fromArray(array $errors): self { } - public function getVersion(): string + public function hasValidationErrors(): bool { } -} -namespace SebastianBergmann\CliParser; - -final class UnknownOptionException extends \RuntimeException implements \SebastianBergmann\CliParser\Exception -{ - public function __construct(string $option) + public function asString(): string { } } -final class OptionDoesNotAllowArgumentException extends \RuntimeException implements \SebastianBergmann\CliParser\Exception +/** + * @internal This class is not covered by the backward compatibility promise for PHPUnit + */ +final class Validator { - public function __construct(string $option) + public function validate(\DOMDocument $document, string $xsdFilename): \PHPUnit\Util\Xml\ValidationResult { } } -interface Exception extends \Throwable -{ -} -final class RequiredOptionArgumentMissingException extends \RuntimeException implements \SebastianBergmann\CliParser\Exception +namespace SebastianBergmann; + +final class Version { - public function __construct(string $option) + public function __construct(string $release, string $path) { } -} -final class AmbiguousOptionException extends \RuntimeException implements \SebastianBergmann\CliParser\Exception -{ - public function __construct(string $option) + public function getVersion(): string { } } +namespace SebastianBergmann\CliParser; + final class Parser { /** @@ -14613,65 +14586,35 @@ public function parse(array $argv, string $shortOptions, ?array $longOptions = n { } } -namespace SebastianBergmann\CodeCoverage; - -final class BranchAndPathCoverageNotSupportedException extends \RuntimeException implements \SebastianBergmann\CodeCoverage\Exception -{ -} -final class ReportAlreadyFinalizedException extends \RuntimeException implements \SebastianBergmann\CodeCoverage\Exception +final class AmbiguousOptionException extends \RuntimeException implements \SebastianBergmann\CliParser\Exception { - public function __construct() + public function __construct(string $option) { } } -final class ParserException extends \RuntimeException implements \SebastianBergmann\CodeCoverage\Exception -{ -} -final class NoCodeCoverageDriverWithPathCoverageSupportAvailableException extends \RuntimeException implements \SebastianBergmann\CodeCoverage\Exception +interface Exception extends \Throwable { - public function __construct() - { - } } -final class NoCodeCoverageDriverAvailableException extends \RuntimeException implements \SebastianBergmann\CodeCoverage\Exception +final class OptionDoesNotAllowArgumentException extends \RuntimeException implements \SebastianBergmann\CliParser\Exception { - public function __construct() + public function __construct(string $option) { } } -final class InvalidArgumentException extends \InvalidArgumentException implements \SebastianBergmann\CodeCoverage\Exception -{ -} -final class XmlException extends \RuntimeException implements \SebastianBergmann\CodeCoverage\Exception -{ -} -final class TestIdMissingException extends \RuntimeException implements \SebastianBergmann\CodeCoverage\Exception +final class RequiredOptionArgumentMissingException extends \RuntimeException implements \SebastianBergmann\CliParser\Exception { - public function __construct() + public function __construct(string $option) { } } -final class StaticAnalysisCacheNotConfiguredException extends \RuntimeException implements \SebastianBergmann\CodeCoverage\Exception -{ -} -interface Exception extends \Throwable -{ -} -final class DeadCodeDetectionNotSupportedException extends \RuntimeException implements \SebastianBergmann\CodeCoverage\Exception -{ -} -final class UnintentionallyCoveredCodeException extends \RuntimeException implements \SebastianBergmann\CodeCoverage\Exception +final class UnknownOptionException extends \RuntimeException implements \SebastianBergmann\CliParser\Exception { - public function __construct(array $unintentionallyCoveredUnits) - { - } - public function getUnintentionallyCoveredUnits(): array + public function __construct(string $option) { } } -final class ReflectionException extends \RuntimeException implements \SebastianBergmann\CodeCoverage\Exception -{ -} +namespace SebastianBergmann\CodeCoverage; + /** * Provides collection functionality for PHP code coverage information. */ @@ -14830,99 +14773,96 @@ public function detectsDeadCode(): bool { } } -final class Version +final class BranchAndPathCoverageNotSupportedException extends \RuntimeException implements \SebastianBergmann\CodeCoverage\Exception { - public static function id(): string - { - } } -final class Filter +final class DeadCodeDetectionNotSupportedException extends \RuntimeException implements \SebastianBergmann\CodeCoverage\Exception { - public function includeDirectory(string $directory, string $suffix = '.php', string $prefix = ''): void - { - } - /** - * @phan-param list $files - */ - public function includeFiles(array $filenames): void - { - } - public function includeFile(string $filename): void - { - } - public function excludeDirectory(string $directory, string $suffix = '.php', string $prefix = ''): void - { - } - public function excludeFile(string $filename): void - { - } - public function isFile(string $filename): bool - { - } - public function isExcluded(string $filename): bool +} +interface Exception extends \Throwable +{ +} +final class InvalidArgumentException extends \InvalidArgumentException implements \SebastianBergmann\CodeCoverage\Exception +{ +} +final class NoCodeCoverageDriverAvailableException extends \RuntimeException implements \SebastianBergmann\CodeCoverage\Exception +{ + public function __construct() { } - /** - * @phan-return list - */ - public function files(): array +} +final class NoCodeCoverageDriverWithPathCoverageSupportAvailableException extends \RuntimeException implements \SebastianBergmann\CodeCoverage\Exception +{ + public function __construct() { } - public function isEmpty(): bool +} +final class ParserException extends \RuntimeException implements \SebastianBergmann\CodeCoverage\Exception +{ +} +final class ReflectionException extends \RuntimeException implements \SebastianBergmann\CodeCoverage\Exception +{ +} +final class ReportAlreadyFinalizedException extends \RuntimeException implements \SebastianBergmann\CodeCoverage\Exception +{ + public function __construct() { } } -/** - * @internal This class is not covered by the backward compatibility promise for phpunit/php-code-coverage - */ -final class RawCodeCoverageData +final class StaticAnalysisCacheNotConfiguredException extends \RuntimeException implements \SebastianBergmann\CodeCoverage\Exception { - public static function fromXdebugWithoutPathCoverage(array $rawCoverage): self +} +final class TestIdMissingException extends \RuntimeException implements \SebastianBergmann\CodeCoverage\Exception +{ + public function __construct() { } - public static function fromXdebugWithPathCoverage(array $rawCoverage): self +} +final class UnintentionallyCoveredCodeException extends \RuntimeException implements \SebastianBergmann\CodeCoverage\Exception +{ + public function __construct(array $unintentionallyCoveredUnits) { } - public static function fromXdebugWithMixedCoverage(array $rawCoverage): self + public function getUnintentionallyCoveredUnits(): array { } - public static function fromUncoveredFile(string $filename, \SebastianBergmann\CodeCoverage\StaticAnalysis\FileAnalyser $analyser): self +} +final class XmlException extends \RuntimeException implements \SebastianBergmann\CodeCoverage\Exception +{ +} +final class Filter +{ + public function includeDirectory(string $directory, string $suffix = '.php', string $prefix = ''): void { } - public function clear(): void + /** + * @phan-param list $files + */ + public function includeFiles(array $filenames): void { } - public function lineCoverage(): array + public function includeFile(string $filename): void { } - public function functionCoverage(): array + public function excludeDirectory(string $directory, string $suffix = '.php', string $prefix = ''): void { } - public function removeCoverageDataForFile(string $filename): void + public function excludeFile(string $filename): void { } - /** - * @param int[] $lines - */ - public function keepLineCoverageDataOnlyForLines(string $filename, array $lines): void + public function isFile(string $filename): bool { } - /** - * @param int[] $linesToBranchMap - */ - public function markExecutableLineByBranch(string $filename, array $linesToBranchMap): void + public function isExcluded(string $filename): bool { } /** - * @param int[] $lines + * @phan-return list */ - public function keepFunctionCoverageDataOnlyForLines(string $filename, array $lines): void + public function files(): array { } - /** - * @param int[] $lines - */ - public function removeCoverageDataForLines(string $filename, array $lines): void + public function isEmpty(): bool { } } @@ -14959,76 +14899,68 @@ public function merge(self $newData): void { } } -namespace SebastianBergmann\CodeCoverage\Driver; - -final class Xdebug2NotEnabledException extends \RuntimeException implements \SebastianBergmann\CodeCoverage\Exception +/** + * @internal This class is not covered by the backward compatibility promise for phpunit/php-code-coverage + */ +final class RawCodeCoverageData { - public function __construct() + public static function fromXdebugWithoutPathCoverage(array $rawCoverage): self { } -} -final class Xdebug3NotEnabledException extends \RuntimeException implements \SebastianBergmann\CodeCoverage\Exception -{ - public function __construct() + public static function fromXdebugWithPathCoverage(array $rawCoverage): self { } -} -final class WrongXdebugVersionException extends \RuntimeException implements \SebastianBergmann\CodeCoverage\Exception -{ -} -final class PathExistsButIsNotDirectoryException extends \RuntimeException implements \SebastianBergmann\CodeCoverage\Exception -{ - public function __construct(string $path) + public static function fromXdebugWithMixedCoverage(array $rawCoverage): self { } -} -final class PcovNotAvailableException extends \RuntimeException implements \SebastianBergmann\CodeCoverage\Exception -{ - public function __construct() + public static function fromUncoveredFile(string $filename, \SebastianBergmann\CodeCoverage\StaticAnalysis\FileAnalyser $analyser): self { } -} -final class XdebugNotAvailableException extends \RuntimeException implements \SebastianBergmann\CodeCoverage\Exception -{ - public function __construct() + public function clear(): void { } -} -final class WriteOperationFailedException extends \RuntimeException implements \SebastianBergmann\CodeCoverage\Exception -{ - public function __construct(string $path) + public function lineCoverage(): array { } -} -final class PhpdbgNotAvailableException extends \RuntimeException implements \SebastianBergmann\CodeCoverage\Exception -{ - public function __construct() + public function functionCoverage(): array + { + } + public function removeCoverageDataForFile(string $filename): void { } -} -final class Selector -{ /** - * @throws \SebastianBergmann\CodeCoverage\NoCodeCoverageDriverAvailableException - * @throws PcovNotAvailableException - * @throws PhpdbgNotAvailableException - * @throws Xdebug2NotEnabledException - * @throws Xdebug3NotEnabledException - * @throws XdebugNotAvailableException + * @param int[] $lines */ - public function forLineCoverage(\SebastianBergmann\CodeCoverage\Filter $filter): \SebastianBergmann\CodeCoverage\Driver\Driver + public function keepLineCoverageDataOnlyForLines(string $filename, array $lines): void { } /** - * @throws \SebastianBergmann\CodeCoverage\NoCodeCoverageDriverWithPathCoverageSupportAvailableException - * @throws Xdebug2NotEnabledException - * @throws Xdebug3NotEnabledException - * @throws XdebugNotAvailableException + * @param int[] $linesToBranchMap */ - public function forLineAndPathCoverage(\SebastianBergmann\CodeCoverage\Filter $filter): \SebastianBergmann\CodeCoverage\Driver\Driver + public function markExecutableLineByBranch(string $filename, array $linesToBranchMap): void + { + } + /** + * @param int[] $lines + */ + public function keepFunctionCoverageDataOnlyForLines(string $filename, array $lines): void + { + } + /** + * @param int[] $lines + */ + public function removeCoverageDataForLines(string $filename, array $lines): void + { + } +} +final class Version +{ + public static function id(): string { } } +namespace SebastianBergmann\CodeCoverage\Driver; + /** * @internal This class is not covered by the backward compatibility promise for phpunit/php-code-coverage */ @@ -15125,22 +15057,14 @@ abstract public function stop(): \SebastianBergmann\CodeCoverage\RawCodeCoverage /** * @internal This class is not covered by the backward compatibility promise for phpunit/php-code-coverage */ -final class Xdebug2Driver extends \SebastianBergmann\CodeCoverage\Driver\Driver +final class PcovDriver extends \SebastianBergmann\CodeCoverage\Driver\Driver { /** - * @throws WrongXdebugVersionException - * @throws Xdebug2NotEnabledException - * @throws XdebugNotAvailableException + * @throws PcovNotAvailableException */ public function __construct(\SebastianBergmann\CodeCoverage\Filter $filter) { } - public function canCollectBranchAndPathCoverage(): bool - { - } - public function canDetectDeadCode(): bool - { - } public function start(): void { } @@ -15172,14 +15096,37 @@ public function nameAndVersion(): string { } } +final class Selector +{ + /** + * @throws \SebastianBergmann\CodeCoverage\NoCodeCoverageDriverAvailableException + * @throws PcovNotAvailableException + * @throws PhpdbgNotAvailableException + * @throws Xdebug2NotEnabledException + * @throws Xdebug3NotEnabledException + * @throws XdebugNotAvailableException + */ + public function forLineCoverage(\SebastianBergmann\CodeCoverage\Filter $filter): \SebastianBergmann\CodeCoverage\Driver\Driver + { + } + /** + * @throws \SebastianBergmann\CodeCoverage\NoCodeCoverageDriverWithPathCoverageSupportAvailableException + * @throws Xdebug2NotEnabledException + * @throws Xdebug3NotEnabledException + * @throws XdebugNotAvailableException + */ + public function forLineAndPathCoverage(\SebastianBergmann\CodeCoverage\Filter $filter): \SebastianBergmann\CodeCoverage\Driver\Driver + { + } +} /** * @internal This class is not covered by the backward compatibility promise for phpunit/php-code-coverage */ -final class Xdebug3Driver extends \SebastianBergmann\CodeCoverage\Driver\Driver +final class Xdebug2Driver extends \SebastianBergmann\CodeCoverage\Driver\Driver { /** * @throws WrongXdebugVersionException - * @throws Xdebug3NotEnabledException + * @throws Xdebug2NotEnabledException * @throws XdebugNotAvailableException */ public function __construct(\SebastianBergmann\CodeCoverage\Filter $filter) @@ -15204,14 +15151,22 @@ public function nameAndVersion(): string /** * @internal This class is not covered by the backward compatibility promise for phpunit/php-code-coverage */ -final class PcovDriver extends \SebastianBergmann\CodeCoverage\Driver\Driver +final class Xdebug3Driver extends \SebastianBergmann\CodeCoverage\Driver\Driver { /** - * @throws PcovNotAvailableException + * @throws WrongXdebugVersionException + * @throws Xdebug3NotEnabledException + * @throws XdebugNotAvailableException */ public function __construct(\SebastianBergmann\CodeCoverage\Filter $filter) { } + public function canCollectBranchAndPathCoverage(): bool + { + } + public function canDetectDeadCode(): bool + { + } public function start(): void { } @@ -15222,59 +15177,53 @@ public function nameAndVersion(): string { } } -namespace SebastianBergmann\CodeCoverage\Node; - -/** - * @internal This class is not covered by the backward compatibility promise for phpunit/php-code-coverage - */ -final class Iterator implements \RecursiveIterator +final class PathExistsButIsNotDirectoryException extends \RuntimeException implements \SebastianBergmann\CodeCoverage\Exception { - public function __construct(\SebastianBergmann\CodeCoverage\Node\Directory $node) - { - } - /** - * Rewinds the Iterator to the first element. - */ - public function rewind(): void + public function __construct(string $path) { } - /** - * Checks if there is a current element after calls to rewind() or next(). - */ - public function valid(): bool +} +final class PcovNotAvailableException extends \RuntimeException implements \SebastianBergmann\CodeCoverage\Exception +{ + public function __construct() { } - /** - * Returns the key of the current element. - */ - public function key(): int +} +final class PhpdbgNotAvailableException extends \RuntimeException implements \SebastianBergmann\CodeCoverage\Exception +{ + public function __construct() { } - /** - * Returns the current element. - */ - public function current(): ?\SebastianBergmann\CodeCoverage\Node\AbstractNode +} +final class WriteOperationFailedException extends \RuntimeException implements \SebastianBergmann\CodeCoverage\Exception +{ + public function __construct(string $path) { } - /** - * Moves forward to next element. - */ - public function next(): void +} +final class WrongXdebugVersionException extends \RuntimeException implements \SebastianBergmann\CodeCoverage\Exception +{ +} +final class Xdebug2NotEnabledException extends \RuntimeException implements \SebastianBergmann\CodeCoverage\Exception +{ + public function __construct() { } - /** - * Returns the sub iterator for the current element. - */ - public function getChildren(): self +} +final class Xdebug3NotEnabledException extends \RuntimeException implements \SebastianBergmann\CodeCoverage\Exception +{ + public function __construct() { } - /** - * Checks whether the current element has children. - */ - public function hasChildren(): bool +} +final class XdebugNotAvailableException extends \RuntimeException implements \SebastianBergmann\CodeCoverage\Exception +{ + public function __construct() { } } +namespace SebastianBergmann\CodeCoverage\Node; + /** * @internal This class is not covered by the backward compatibility promise for phpunit/php-code-coverage */ @@ -15377,24 +15326,39 @@ public function build(\SebastianBergmann\CodeCoverage\CodeCoverage $coverage): \ /** * @internal This class is not covered by the backward compatibility promise for phpunit/php-code-coverage */ -final class File extends \SebastianBergmann\CodeCoverage\Node\AbstractNode +final class CrapIndex { - /** - * @phan-param array{linesOfCode: int, commentLinesOfCode: int, nonCommentLinesOfCode: int} $linesOfCode - */ - public function __construct(string $name, \SebastianBergmann\CodeCoverage\Node\AbstractNode $parent, array $lineCoverageData, array $functionCoverageData, array $testData, array $classes, array $traits, array $functions, array $linesOfCode) + public function __construct(int $cyclomaticComplexity, float $codeCoverage) { } + public function asString(): string + { + } +} +/** + * @internal This class is not covered by the backward compatibility promise for phpunit/php-code-coverage + */ +final class Directory extends \SebastianBergmann\CodeCoverage\Node\AbstractNode implements \IteratorAggregate +{ public function count(): int { } - public function lineCoverageData(): array + public function getIterator(): \RecursiveIteratorIterator { } - public function functionCoverageData(): array + public function addDirectory(string $name): self { } - public function testData(): array + public function addFile(\SebastianBergmann\CodeCoverage\Node\File $file): void + { + } + public function directories(): array + { + } + public function files(): array + { + } + public function children(): array { } public function classes(): array @@ -15455,30 +15419,27 @@ public function numberOfTestedFunctions(): int { } } -/** - * @internal This class is not covered by the backward compatibility promise for phpunit/php-code-coverage - */ -final class Directory extends \SebastianBergmann\CodeCoverage\Node\AbstractNode implements \IteratorAggregate -{ - public function count(): int - { - } - public function getIterator(): \RecursiveIteratorIterator - { - } - public function addDirectory(string $name): self +/** + * @internal This class is not covered by the backward compatibility promise for phpunit/php-code-coverage + */ +final class File extends \SebastianBergmann\CodeCoverage\Node\AbstractNode +{ + /** + * @phan-param array{linesOfCode: int, commentLinesOfCode: int, nonCommentLinesOfCode: int} $linesOfCode + */ + public function __construct(string $name, \SebastianBergmann\CodeCoverage\Node\AbstractNode $parent, array $lineCoverageData, array $functionCoverageData, array $testData, array $classes, array $traits, array $functions, array $linesOfCode) { } - public function addFile(\SebastianBergmann\CodeCoverage\Node\File $file): void + public function count(): int { } - public function directories(): array + public function lineCoverageData(): array { } - public function files(): array + public function functionCoverageData(): array { } - public function children(): array + public function testData(): array { } public function classes(): array @@ -15542,38 +15503,62 @@ public function numberOfTestedFunctions(): int /** * @internal This class is not covered by the backward compatibility promise for phpunit/php-code-coverage */ -final class CrapIndex +final class Iterator implements \RecursiveIterator { - public function __construct(int $cyclomaticComplexity, float $codeCoverage) + public function __construct(\SebastianBergmann\CodeCoverage\Node\Directory $node) { } - public function asString(): string + /** + * Rewinds the Iterator to the first element. + */ + public function rewind(): void { } -} -namespace SebastianBergmann\CodeCoverage\Report; - -final class Clover -{ /** - * @throws \SebastianBergmann\CodeCoverage\Driver\WriteOperationFailedException + * Checks if there is a current element after calls to rewind() or next(). */ - public function process(\SebastianBergmann\CodeCoverage\CodeCoverage $coverage, ?string $target = null, ?string $name = null): string + public function valid(): bool { } -} -final class Text -{ - public function __construct(int $lowUpperBound = 50, int $highLowerBound = 90, bool $showUncoveredFiles = false, bool $showOnlySummary = false) + /** + * Returns the key of the current element. + */ + public function key(): int { } - public function process(\SebastianBergmann\CodeCoverage\CodeCoverage $coverage, bool $showColors = false): string + /** + * Returns the current element. + */ + public function current(): ?\SebastianBergmann\CodeCoverage\Node\AbstractNode + { + } + /** + * Moves forward to next element. + */ + public function next(): void + { + } + /** + * Returns the sub iterator for the current element. + */ + public function getChildren(): self + { + } + /** + * Checks whether the current element has children. + */ + public function hasChildren(): bool { } } -final class PHP +namespace SebastianBergmann\CodeCoverage\Report; + +final class Clover { - public function process(\SebastianBergmann\CodeCoverage\CodeCoverage $coverage, ?string $target = null): string + /** + * @throws \SebastianBergmann\CodeCoverage\Driver\WriteOperationFailedException + */ + public function process(\SebastianBergmann\CodeCoverage\CodeCoverage $coverage, ?string $target = null, ?string $name = null): string { } } @@ -15598,32 +15583,29 @@ public function process(\SebastianBergmann\CodeCoverage\CodeCoverage $coverage, { } } -namespace SebastianBergmann\CodeCoverage\Report\Html; - -/** - * @internal This class is not covered by the backward compatibility promise for phpunit/php-code-coverage - */ -final class Dashboard extends \SebastianBergmann\CodeCoverage\Report\Html\Renderer +final class PHP { - public function render(\SebastianBergmann\CodeCoverage\Node\Directory $node, string $file): void + public function process(\SebastianBergmann\CodeCoverage\CodeCoverage $coverage, ?string $target = null): string { } } -/** - * @internal This class is not covered by the backward compatibility promise for phpunit/php-code-coverage - */ -final class File extends \SebastianBergmann\CodeCoverage\Report\Html\Renderer +final class Text { - public function render(\SebastianBergmann\CodeCoverage\Node\File $node, string $file): void + public function __construct(int $lowUpperBound = 50, int $highLowerBound = 90, bool $showUncoveredFiles = false, bool $showOnlySummary = false) + { + } + public function process(\SebastianBergmann\CodeCoverage\CodeCoverage $coverage, bool $showColors = false): string { } } -/** - * @internal This class is not covered by the backward compatibility promise for phpunit/php-code-coverage - */ -final class Directory extends \SebastianBergmann\CodeCoverage\Report\Html\Renderer +namespace SebastianBergmann\CodeCoverage\Report\Html; + +final class Facade { - public function render(\SebastianBergmann\CodeCoverage\Node\Directory $node, string $file): void + public function __construct(int $lowUpperBound = 50, int $highLowerBound = 90, string $generator = '') + { + } + public function process(\SebastianBergmann\CodeCoverage\CodeCoverage $coverage, string $target): void { } } @@ -15688,12 +15670,30 @@ protected function colorLevel(float $percent): string { } } -final class Facade +/** + * @internal This class is not covered by the backward compatibility promise for phpunit/php-code-coverage + */ +final class Dashboard extends \SebastianBergmann\CodeCoverage\Report\Html\Renderer { - public function __construct(int $lowUpperBound = 50, int $highLowerBound = 90, string $generator = '') + public function render(\SebastianBergmann\CodeCoverage\Node\Directory $node, string $file): void { } - public function process(\SebastianBergmann\CodeCoverage\CodeCoverage $coverage, string $target): void +} +/** + * @internal This class is not covered by the backward compatibility promise for phpunit/php-code-coverage + */ +final class Directory extends \SebastianBergmann\CodeCoverage\Report\Html\Renderer +{ + public function render(\SebastianBergmann\CodeCoverage\Node\Directory $node, string $file): void + { + } +} +/** + * @internal This class is not covered by the backward compatibility promise for phpunit/php-code-coverage + */ +final class File extends \SebastianBergmann\CodeCoverage\Report\Html\Renderer +{ + public function render(\SebastianBergmann\CodeCoverage\Node\File $node, string $file): void { } } @@ -15702,170 +15702,221 @@ public function process(\SebastianBergmann\CodeCoverage\CodeCoverage $coverage, /** * @internal This class is not covered by the backward compatibility promise for phpunit/php-code-coverage */ -abstract class Node +final class BuildInformation { - public function __construct(\DOMElement $context) + public function __construct(\DOMElement $contextNode) { } - public function dom(): \DOMDocument + public function setRuntimeInformation(\SebastianBergmann\Environment\Runtime $runtime): void { } - public function totals(): \SebastianBergmann\CodeCoverage\Report\Xml\Totals + public function setBuildTime(\DateTimeImmutable $date): void { } - public function addDirectory(string $name): \SebastianBergmann\CodeCoverage\Report\Xml\Directory + public function setGeneratorVersions(string $phpUnitVersion, string $coverageVersion): void { } - public function addFile(string $name, string $href): \SebastianBergmann\CodeCoverage\Report\Xml\File +} +/** + * @internal This class is not covered by the backward compatibility promise for phpunit/php-code-coverage + */ +final class Coverage +{ + public function __construct(\DOMElement $context, string $line) { } - protected function setContextNode(\DOMElement $context): void + /** + * @throws \SebastianBergmann\CodeCoverage\ReportAlreadyFinalizedException + */ + public function addTest(string $test): void { } - protected function contextNode(): \DOMElement + public function finalize(): void { } } /** * @internal This class is not covered by the backward compatibility promise for phpunit/php-code-coverage */ -final class Source +final class Directory extends \SebastianBergmann\CodeCoverage\Report\Xml\Node { - public function __construct(\DOMElement $context) +} +final class Facade +{ + public function __construct(string $version) { } - public function setSourceCode(string $source): void + /** + * @throws \SebastianBergmann\CodeCoverage\XmlException + */ + public function process(\SebastianBergmann\CodeCoverage\CodeCoverage $coverage, string $target): void { } } /** * @internal This class is not covered by the backward compatibility promise for phpunit/php-code-coverage */ -final class Project extends \SebastianBergmann\CodeCoverage\Report\Xml\Node +class File { - public function __construct(string $directory) + public function __construct(\DOMElement $context) { } - public function projectSourceDirectory(): string + public function totals(): \SebastianBergmann\CodeCoverage\Report\Xml\Totals { } - public function buildInformation(): \SebastianBergmann\CodeCoverage\Report\Xml\BuildInformation + public function lineCoverage(string $line): \SebastianBergmann\CodeCoverage\Report\Xml\Coverage { } - public function tests(): \SebastianBergmann\CodeCoverage\Report\Xml\Tests + protected function contextNode(): \DOMElement { } - public function asDom(): \DOMDocument + protected function dom(): \DOMDocument { } } /** * @internal This class is not covered by the backward compatibility promise for phpunit/php-code-coverage */ -final class Report extends \SebastianBergmann\CodeCoverage\Report\Xml\File +final class Method { - public function __construct(string $name) - { - } - public function asDom(): \DOMDocument + public function __construct(\DOMElement $context, string $name) { } - public function functionObject($name): \SebastianBergmann\CodeCoverage\Report\Xml\Method + public function setSignature(string $signature): void { } - public function classObject($name): \SebastianBergmann\CodeCoverage\Report\Xml\Unit + public function setLines(string $start, ?string $end = null): void { } - public function traitObject($name): \SebastianBergmann\CodeCoverage\Report\Xml\Unit + public function setTotals(string $executable, string $executed, string $coverage): void { } - public function source(): \SebastianBergmann\CodeCoverage\Report\Xml\Source + public function setCrap(string $crap): void { } } /** * @internal This class is not covered by the backward compatibility promise for phpunit/php-code-coverage */ -final class Totals +abstract class Node { - public function __construct(\DOMElement $container) + public function __construct(\DOMElement $context) { } - public function container(): \DOMNode + public function dom(): \DOMDocument { } - public function setNumLines(int $loc, int $cloc, int $ncloc, int $executable, int $executed): void + public function totals(): \SebastianBergmann\CodeCoverage\Report\Xml\Totals { } - public function setNumClasses(int $count, int $tested): void + public function addDirectory(string $name): \SebastianBergmann\CodeCoverage\Report\Xml\Directory { } - public function setNumTraits(int $count, int $tested): void + public function addFile(string $name, string $href): \SebastianBergmann\CodeCoverage\Report\Xml\File { } - public function setNumMethods(int $count, int $tested): void + protected function setContextNode(\DOMElement $context): void { } - public function setNumFunctions(int $count, int $tested): void + protected function contextNode(): \DOMElement { } } /** * @internal This class is not covered by the backward compatibility promise for phpunit/php-code-coverage */ -final class Coverage +final class Project extends \SebastianBergmann\CodeCoverage\Report\Xml\Node { - public function __construct(\DOMElement $context, string $line) + public function __construct(string $directory) { } - /** - * @throws \SebastianBergmann\CodeCoverage\ReportAlreadyFinalizedException - */ - public function addTest(string $test): void + public function projectSourceDirectory(): string + { + } + public function buildInformation(): \SebastianBergmann\CodeCoverage\Report\Xml\BuildInformation + { + } + public function tests(): \SebastianBergmann\CodeCoverage\Report\Xml\Tests + { + } + public function asDom(): \DOMDocument + { + } +} +/** + * @internal This class is not covered by the backward compatibility promise for phpunit/php-code-coverage + */ +final class Report extends \SebastianBergmann\CodeCoverage\Report\Xml\File +{ + public function __construct(string $name) + { + } + public function asDom(): \DOMDocument + { + } + public function functionObject($name): \SebastianBergmann\CodeCoverage\Report\Xml\Method + { + } + public function classObject($name): \SebastianBergmann\CodeCoverage\Report\Xml\Unit + { + } + public function traitObject($name): \SebastianBergmann\CodeCoverage\Report\Xml\Unit + { + } + public function source(): \SebastianBergmann\CodeCoverage\Report\Xml\Source + { + } +} +/** + * @internal This class is not covered by the backward compatibility promise for phpunit/php-code-coverage + */ +final class Source +{ + public function __construct(\DOMElement $context) { } - public function finalize(): void + public function setSourceCode(string $source): void { } } -final class Facade +/** + * @internal This class is not covered by the backward compatibility promise for phpunit/php-code-coverage + */ +final class Tests { - public function __construct(string $version) + public function __construct(\DOMElement $context) { } - /** - * @throws \SebastianBergmann\CodeCoverage\XmlException - */ - public function process(\SebastianBergmann\CodeCoverage\CodeCoverage $coverage, string $target): void + public function addTest(string $test, array $result): void { } } /** * @internal This class is not covered by the backward compatibility promise for phpunit/php-code-coverage */ -class File +final class Totals { - public function __construct(\DOMElement $context) + public function __construct(\DOMElement $container) { } - public function totals(): \SebastianBergmann\CodeCoverage\Report\Xml\Totals + public function container(): \DOMNode { } - public function lineCoverage(string $line): \SebastianBergmann\CodeCoverage\Report\Xml\Coverage + public function setNumLines(int $loc, int $cloc, int $ncloc, int $executable, int $executed): void { } - protected function contextNode(): \DOMElement + public function setNumClasses(int $count, int $tested): void { } - protected function dom(): \DOMDocument + public function setNumTraits(int $count, int $tested): void + { + } + public function setNumMethods(int $count, int $tested): void + { + } + public function setNumFunctions(int $count, int $tested): void { } -} -/** - * @internal This class is not covered by the backward compatibility promise for phpunit/php-code-coverage - */ -final class Directory extends \SebastianBergmann\CodeCoverage\Report\Xml\Node -{ } /** * @internal This class is not covered by the backward compatibility promise for phpunit/php-code-coverage @@ -15888,59 +15939,47 @@ public function addMethod(string $name): \SebastianBergmann\CodeCoverage\Report\ { } } -/** - * @internal This class is not covered by the backward compatibility promise for phpunit/php-code-coverage - */ -final class Tests +namespace SebastianBergmann\CodeCoverage\StaticAnalysis; + +final class CacheWarmer { - public function __construct(\DOMElement $context) - { - } - public function addTest(string $test, array $result): void + public function warmCache(string $cacheDirectory, bool $useAnnotationsForIgnoringCode, bool $ignoreDeprecatedCode, \SebastianBergmann\CodeCoverage\Filter $filter): void { } } /** * @internal This class is not covered by the backward compatibility promise for phpunit/php-code-coverage */ -final class Method +final class CachingFileAnalyser implements \SebastianBergmann\CodeCoverage\StaticAnalysis\FileAnalyser { - public function __construct(\DOMElement $context, string $name) - { - } - public function setSignature(string $signature): void + public function __construct(string $directory, \SebastianBergmann\CodeCoverage\StaticAnalysis\FileAnalyser $analyser, bool $useAnnotationsForIgnoringCode, bool $ignoreDeprecatedCode) { } - public function setLines(string $start, ?string $end = null): void + public function classesIn(string $filename): array { } - public function setTotals(string $executable, string $executed, string $coverage): void + public function traitsIn(string $filename): array { } - public function setCrap(string $crap): void + public function functionsIn(string $filename): array { } -} -/** - * @internal This class is not covered by the backward compatibility promise for phpunit/php-code-coverage - */ -final class BuildInformation -{ - public function __construct(\DOMElement $contextNode) + /** + * @phan-return array{linesOfCode: int, commentLinesOfCode: int, nonCommentLinesOfCode: int} + */ + public function linesOfCodeFor(string $filename): array { } - public function setRuntimeInformation(\SebastianBergmann\Environment\Runtime $runtime): void + public function executableLinesIn(string $filename): array { } - public function setBuildTime(\DateTimeImmutable $date): void + public function ignoredLinesFor(string $filename): array { } - public function setGeneratorVersions(string $phpUnitVersion, string $coverageVersion): void + public function process(string $filename): void { } } -namespace SebastianBergmann\CodeCoverage\StaticAnalysis; - /** * @internal This class is not covered by the backward compatibility promise for phpunit/php-code-coverage */ @@ -15968,24 +16007,6 @@ public function functions(): array { } } -/** - * @internal This class is not covered by the backward compatibility promise for phpunit/php-code-coverage - */ -final class IgnoredLinesFindingVisitor extends \PhpParser\NodeVisitorAbstract -{ - public function __construct(bool $useAnnotationsForIgnoringCode, bool $ignoreDeprecated) - { - } - public function enterNode(\PhpParser\Node $node): void - { - } - /** - * @phan-return list - */ - public function ignoredLines(): array - { - } -} /** * @internal This class is not covered by the backward compatibility promise for phpunit/php-code-coverage */ @@ -16019,42 +16040,21 @@ public function linesOfCodeFor(string $filename): array; public function executableLinesIn(string $filename): array; public function ignoredLinesFor(string $filename): array; } -final class CacheWarmer -{ - public function warmCache(string $cacheDirectory, bool $useAnnotationsForIgnoringCode, bool $ignoreDeprecatedCode, \SebastianBergmann\CodeCoverage\Filter $filter): void - { - } -} /** * @internal This class is not covered by the backward compatibility promise for phpunit/php-code-coverage */ -final class CachingFileAnalyser implements \SebastianBergmann\CodeCoverage\StaticAnalysis\FileAnalyser +final class IgnoredLinesFindingVisitor extends \PhpParser\NodeVisitorAbstract { - public function __construct(string $directory, \SebastianBergmann\CodeCoverage\StaticAnalysis\FileAnalyser $analyser, bool $useAnnotationsForIgnoringCode, bool $ignoreDeprecatedCode) - { - } - public function classesIn(string $filename): array - { - } - public function traitsIn(string $filename): array + public function __construct(bool $useAnnotationsForIgnoringCode, bool $ignoreDeprecated) { } - public function functionsIn(string $filename): array + public function enterNode(\PhpParser\Node $node): void { } /** - * @phan-return array{linesOfCode: int, commentLinesOfCode: int, nonCommentLinesOfCode: int} + * @phan-return list */ - public function linesOfCodeFor(string $filename): array - { - } - public function executableLinesIn(string $filename): array - { - } - public function ignoredLinesFor(string $filename): array - { - } - public function process(string $filename): void + public function ignoredLines(): array { } } @@ -16125,51 +16125,6 @@ public function asFixedWidthString(): string } namespace SebastianBergmann\CodeUnit; -final class NoTraitException extends \RuntimeException implements \SebastianBergmann\CodeUnit\Exception -{ -} -interface Exception extends \Throwable -{ -} -final class InvalidCodeUnitException extends \RuntimeException implements \SebastianBergmann\CodeUnit\Exception -{ -} -final class ReflectionException extends \RuntimeException implements \SebastianBergmann\CodeUnit\Exception -{ -} -/** - * @phan-side-effect-free - */ -final class FunctionUnit extends \SebastianBergmann\CodeUnit\CodeUnit -{ - /** - * @psalm-assert-if-true FunctionUnit $this - */ - public function isFunction(): bool - { - } -} -final class CodeUnitCollectionIterator implements \Iterator -{ - public function __construct(\SebastianBergmann\CodeUnit\CodeUnitCollection $collection) - { - } - public function rewind(): void - { - } - public function valid(): bool - { - } - public function key(): int - { - } - public function current(): \SebastianBergmann\CodeUnit\CodeUnit - { - } - public function next(): void - { - } -} /** * @phan-side-effect-free */ @@ -16185,12 +16140,12 @@ public function isClassMethod(): bool /** * @phan-side-effect-free */ -final class InterfaceUnit extends \SebastianBergmann\CodeUnit\CodeUnit +final class ClassUnit extends \SebastianBergmann\CodeUnit\CodeUnit { /** - * @psalm-assert-if-true InterfaceUnit $this + * @psalm-assert-if-true ClassUnit $this */ - public function isInterface(): bool + public function isClass(): bool { } } @@ -16296,15 +16251,90 @@ public function isFunction(): bool { } } +final class CodeUnitCollection implements \Countable, \IteratorAggregate +{ + /** + * @phan-param list $items + */ + public static function fromArray(array $items): self + { + } + public static function fromList(\SebastianBergmann\CodeUnit\CodeUnit ...$items): self + { + } + /** + * @phan-return list + */ + public function asArray(): array + { + } + public function getIterator(): \SebastianBergmann\CodeUnit\CodeUnitCollectionIterator + { + } + public function count(): int + { + } + public function isEmpty(): bool + { + } + public function mergeWith(self $other): self + { + } +} +final class CodeUnitCollectionIterator implements \Iterator +{ + public function __construct(\SebastianBergmann\CodeUnit\CodeUnitCollection $collection) + { + } + public function rewind(): void + { + } + public function valid(): bool + { + } + public function key(): int + { + } + public function current(): \SebastianBergmann\CodeUnit\CodeUnit + { + } + public function next(): void + { + } +} +/** + * @phan-side-effect-free + */ +final class FunctionUnit extends \SebastianBergmann\CodeUnit\CodeUnit +{ + /** + * @psalm-assert-if-true FunctionUnit $this + */ + public function isFunction(): bool + { + } +} +/** + * @phan-side-effect-free + */ +final class InterfaceMethodUnit extends \SebastianBergmann\CodeUnit\CodeUnit +{ + /** + * @psalm-assert-if-true InterfaceMethod $this + */ + public function isInterfaceMethod(): bool + { + } +} /** * @phan-side-effect-free */ -final class TraitMethodUnit extends \SebastianBergmann\CodeUnit\CodeUnit +final class InterfaceUnit extends \SebastianBergmann\CodeUnit\CodeUnit { /** - * @psalm-assert-if-true TraitMethodUnit $this + * @psalm-assert-if-true InterfaceUnit $this */ - public function isTraitMethod(): bool + public function isInterface(): bool { } } @@ -16324,6 +16354,18 @@ public function stringToCodeUnits(string $unit): \SebastianBergmann\CodeUnit\Cod { } } +/** + * @phan-side-effect-free + */ +final class TraitMethodUnit extends \SebastianBergmann\CodeUnit\CodeUnit +{ + /** + * @psalm-assert-if-true TraitMethodUnit $this + */ + public function isTraitMethod(): bool + { + } +} /** * @phan-side-effect-free */ @@ -16336,89 +16378,206 @@ public function isTrait(): bool { } } +interface Exception extends \Throwable +{ +} +final class InvalidCodeUnitException extends \RuntimeException implements \SebastianBergmann\CodeUnit\Exception +{ +} +final class NoTraitException extends \RuntimeException implements \SebastianBergmann\CodeUnit\Exception +{ +} +final class ReflectionException extends \RuntimeException implements \SebastianBergmann\CodeUnit\Exception +{ +} +namespace SebastianBergmann\CodeUnitReverseLookup; + /** - * @phan-side-effect-free + * @since Class available since Release 1.0.0 */ -final class ClassUnit extends \SebastianBergmann\CodeUnit\CodeUnit +class Wizard { /** - * @psalm-assert-if-true ClassUnit $this + * @param string $filename + * @param int $lineNumber + * + * @return string */ - public function isClass(): bool + public function lookup($filename, $lineNumber) { } } +namespace SebastianBergmann\Comparator; + /** - * @phan-side-effect-free + * Compares arrays for equality. + * + * Arrays are equal if they contain the same key-value pairs. + * The order of the keys does not matter. + * The types of key-value pairs do not matter. */ -final class InterfaceMethodUnit extends \SebastianBergmann\CodeUnit\CodeUnit +class ArrayComparator extends \SebastianBergmann\Comparator\Comparator { /** - * @psalm-assert-if-true InterfaceMethod $this + * Returns whether the comparator can compare two values. + * + * @param mixed $expected The first value to compare + * @param mixed $actual The second value to compare + * + * @return bool */ - public function isInterfaceMethod(): bool + public function accepts($expected, $actual) + { + } + /** + * Asserts that two arrays are equal. + * + * @param mixed $expected First value to compare + * @param mixed $actual Second value to compare + * @param float $delta Allowed numerical distance between two values to consider them equal + * @param bool $canonicalize Arrays are sorted before comparison when set to true + * @param bool $ignoreCase Case is ignored when set to true + * @param array $processed List of already processed elements (used to prevent infinite recursion) + * + * @throws ComparisonFailure + */ + public function assertEquals($expected, $actual, $delta = 0.0, $canonicalize = false, $ignoreCase = false, array &$processed = []) + { + } + protected function indent($lines) { } } -final class CodeUnitCollection implements \Countable, \IteratorAggregate +/** + * Abstract base class for comparators which compare values for equality. + */ +abstract class Comparator { /** - * @phan-param list $items + * @var Factory */ - public static function fromArray(array $items): self + protected $factory; + /** + * @var \SebastianBergmann\Exporter\Exporter + */ + protected $exporter; + public function __construct() { } - public static function fromList(\SebastianBergmann\CodeUnit\CodeUnit ...$items): self + public function setFactory(\SebastianBergmann\Comparator\Factory $factory) { } /** - * @phan-return list + * Returns whether the comparator can compare two values. + * + * @param mixed $expected The first value to compare + * @param mixed $actual The second value to compare + * + * @return bool */ - public function asArray(): array + abstract public function accepts($expected, $actual); + /** + * Asserts that two values are equal. + * + * @param mixed $expected First value to compare + * @param mixed $actual Second value to compare + * @param float $delta Allowed numerical distance between two values to consider them equal + * @param bool $canonicalize Arrays are sorted before comparison when set to true + * @param bool $ignoreCase Case is ignored when set to true + * + * @throws ComparisonFailure + */ + abstract public function assertEquals($expected, $actual, $delta = 0.0, $canonicalize = false, $ignoreCase = false); +} +/** + * Thrown when an assertion for string equality failed. + */ +class ComparisonFailure extends \RuntimeException +{ + /** + * Expected value of the retrieval which does not match $actual. + * + * @var mixed + */ + protected $expected; + /** + * Actually retrieved value which does not match $expected. + * + * @var mixed + */ + protected $actual; + /** + * The string representation of the expected value. + * + * @var string + */ + protected $expectedAsString; + /** + * The string representation of the actual value. + * + * @var string + */ + protected $actualAsString; + /** + * @var bool + */ + protected $identical; + /** + * Optional message which is placed in front of the first line + * returned by toString(). + * + * @var string + */ + protected $message; + /** + * Initialises with the expected value and the actual value. + * + * @param mixed $expected expected value retrieved + * @param mixed $actual actual value retrieved + * @param string $expectedAsString + * @param string $actualAsString + * @param bool $identical + * @param string $message a string which is prefixed on all returned lines + * in the difference output + */ + public function __construct($expected, $actual, $expectedAsString, $actualAsString, $identical = false, $message = '') { } - public function getIterator(): \SebastianBergmann\CodeUnit\CodeUnitCollectionIterator + public function getActual() { } - public function count(): int + public function getExpected() { } - public function isEmpty(): bool + /** + * @return string + */ + public function getActualAsString() { } - public function mergeWith(self $other): self + /** + * @return string + */ + public function getExpectedAsString() { } -} -namespace SebastianBergmann\CodeUnitReverseLookup; - -/** - * @since Class available since Release 1.0.0 - */ -class Wizard -{ /** - * @param string $filename - * @param int $lineNumber - * * @return string */ - public function lookup($filename, $lineNumber) + public function getDiff() + { + } + /** + * @return string + */ + public function toString() { } -} -namespace SebastianBergmann\Comparator; - -final class RuntimeException extends \RuntimeException implements \SebastianBergmann\Comparator\Exception -{ -} -interface Exception extends \Throwable -{ } /** - * Compares objects for equality. + * Compares DOMNode instances for equality. */ -class ObjectComparator extends \SebastianBergmann\Comparator\ArrayComparator +class DOMNodeComparator extends \SebastianBergmann\Comparator\ObjectComparator { /** * Returns whether the comparator can compare two values. @@ -16446,23 +16605,53 @@ public function accepts($expected, $actual) public function assertEquals($expected, $actual, $delta = 0.0, $canonicalize = false, $ignoreCase = false, array &$processed = []) { } +} +/** + * Compares DateTimeInterface instances for equality. + */ +class DateTimeComparator extends \SebastianBergmann\Comparator\ObjectComparator +{ + /** + * Returns whether the comparator can compare two values. + * + * @param mixed $expected The first value to compare + * @param mixed $actual The second value to compare + * + * @return bool + */ + public function accepts($expected, $actual) + { + } /** - * Converts an object to an array containing all of its private, protected - * and public properties. + * Asserts that two values are equal. * - * @param object $object + * @param mixed $expected First value to compare + * @param mixed $actual Second value to compare + * @param float $delta Allowed numerical distance between two values to consider them equal + * @param bool $canonicalize Arrays are sorted before comparison when set to true + * @param bool $ignoreCase Case is ignored when set to true + * @param array $processed List of already processed elements (used to prevent infinite recursion) * - * @return array + * @throws \Exception + * @throws ComparisonFailure */ - protected function toArray($object) + public function assertEquals($expected, $actual, $delta = 0.0, $canonicalize = false, $ignoreCase = false, array &$processed = []) { } } /** - * Compares resources for equality. + * Compares doubles for equality. + * + * @deprecated since v3.0.5 and v4.0.8 */ -class ResourceComparator extends \SebastianBergmann\Comparator\Comparator +class DoubleComparator extends \SebastianBergmann\Comparator\NumericComparator { + /** + * Smallest value available in PHP. + * + * @var float + */ + public const EPSILON = 1.0E-10; /** * Returns whether the comparator can compare two values. * @@ -16490,9 +16679,9 @@ public function assertEquals($expected, $actual, $delta = 0.0, $canonicalize = f } } /** - * Compares DOMNode instances for equality. + * Compares Exception instances for equality. */ -class DOMNodeComparator extends \SebastianBergmann\Comparator\ObjectComparator +class ExceptionComparator extends \SebastianBergmann\Comparator\ObjectComparator { /** * Returns whether the comparator can compare two values. @@ -16506,18 +16695,14 @@ public function accepts($expected, $actual) { } /** - * Asserts that two values are equal. + * Converts an object to an array containing all of its private, protected + * and public properties. * - * @param mixed $expected First value to compare - * @param mixed $actual Second value to compare - * @param float $delta Allowed numerical distance between two values to consider them equal - * @param bool $canonicalize Arrays are sorted before comparison when set to true - * @param bool $ignoreCase Case is ignored when set to true - * @param array $processed List of already processed elements (used to prevent infinite recursion) + * @param object $object * - * @throws ComparisonFailure + * @return array */ - public function assertEquals($expected, $actual, $delta = 0.0, $canonicalize = false, $ignoreCase = false, array &$processed = []) + protected function toArray($object) { } } @@ -16579,39 +16764,6 @@ public function reset() { } } -/** - * Compares DateTimeInterface instances for equality. - */ -class DateTimeComparator extends \SebastianBergmann\Comparator\ObjectComparator -{ - /** - * Returns whether the comparator can compare two values. - * - * @param mixed $expected The first value to compare - * @param mixed $actual The second value to compare - * - * @return bool - */ - public function accepts($expected, $actual) - { - } - /** - * Asserts that two values are equal. - * - * @param mixed $expected First value to compare - * @param mixed $actual Second value to compare - * @param float $delta Allowed numerical distance between two values to consider them equal - * @param bool $canonicalize Arrays are sorted before comparison when set to true - * @param bool $ignoreCase Case is ignored when set to true - * @param array $processed List of already processed elements (used to prevent infinite recursion) - * - * @throws \Exception - * @throws ComparisonFailure - */ - public function assertEquals($expected, $actual, $delta = 0.0, $canonicalize = false, $ignoreCase = false, array &$processed = []) - { - } -} /** * Compares PHPUnit\Framework\MockObject\MockObject instances for equality. */ @@ -16641,37 +16793,9 @@ protected function toArray($object) } } /** - * Compares Exception instances for equality. - */ -class ExceptionComparator extends \SebastianBergmann\Comparator\ObjectComparator -{ - /** - * Returns whether the comparator can compare two values. - * - * @param mixed $expected The first value to compare - * @param mixed $actual The second value to compare - * - * @return bool - */ - public function accepts($expected, $actual) - { - } - /** - * Converts an object to an array containing all of its private, protected - * and public properties. - * - * @param object $object - * - * @return array - */ - protected function toArray($object) - { - } -} -/** - * Compares scalar or NULL values for equality. + * Compares numerical values for equality. */ -class ScalarComparator extends \SebastianBergmann\Comparator\Comparator +class NumericComparator extends \SebastianBergmann\Comparator\ScalarComparator { /** * Returns whether the comparator can compare two values. @@ -16680,8 +16804,6 @@ class ScalarComparator extends \SebastianBergmann\Comparator\Comparator * @param mixed $actual The second value to compare * * @return bool - * - * @since Method available since Release 3.6.0 */ public function accepts($expected, $actual) { @@ -16702,9 +16824,9 @@ public function assertEquals($expected, $actual, $delta = 0.0, $canonicalize = f } } /** - * Compares numerical values for equality. + * Compares objects for equality. */ -class NumericComparator extends \SebastianBergmann\Comparator\ScalarComparator +class ObjectComparator extends \SebastianBergmann\Comparator\ArrayComparator { /** * Returns whether the comparator can compare two values. @@ -16725,56 +16847,29 @@ public function accepts($expected, $actual) * @param float $delta Allowed numerical distance between two values to consider them equal * @param bool $canonicalize Arrays are sorted before comparison when set to true * @param bool $ignoreCase Case is ignored when set to true + * @param array $processed List of already processed elements (used to prevent infinite recursion) * * @throws ComparisonFailure */ - public function assertEquals($expected, $actual, $delta = 0.0, $canonicalize = false, $ignoreCase = false) - { - } -} -/** - * Compares doubles for equality. - * - * @deprecated since v3.0.5 and v4.0.8 - */ -class DoubleComparator extends \SebastianBergmann\Comparator\NumericComparator -{ - /** - * Smallest value available in PHP. - * - * @var float - */ - public const EPSILON = 1.0E-10; - /** - * Returns whether the comparator can compare two values. - * - * @param mixed $expected The first value to compare - * @param mixed $actual The second value to compare - * - * @return bool - */ - public function accepts($expected, $actual) + public function assertEquals($expected, $actual, $delta = 0.0, $canonicalize = false, $ignoreCase = false, array &$processed = []) { } /** - * Asserts that two values are equal. + * Converts an object to an array containing all of its private, protected + * and public properties. * - * @param mixed $expected First value to compare - * @param mixed $actual Second value to compare - * @param float $delta Allowed numerical distance between two values to consider them equal - * @param bool $canonicalize Arrays are sorted before comparison when set to true - * @param bool $ignoreCase Case is ignored when set to true + * @param object $object * - * @throws ComparisonFailure + * @return array */ - public function assertEquals($expected, $actual, $delta = 0.0, $canonicalize = false, $ignoreCase = false) + protected function toArray($object) { } } /** - * Compares values for type equality. + * Compares resources for equality. */ -class TypeComparator extends \SebastianBergmann\Comparator\Comparator +class ResourceComparator extends \SebastianBergmann\Comparator\Comparator { /** * Returns whether the comparator can compare two values. @@ -16802,129 +16897,36 @@ public function assertEquals($expected, $actual, $delta = 0.0, $canonicalize = f { } } -/** - * Abstract base class for comparators which compare values for equality. - */ -abstract class Comparator -{ - /** - * @var Factory - */ - protected $factory; - /** - * @var \SebastianBergmann\Exporter\Exporter - */ - protected $exporter; - public function __construct() - { - } - public function setFactory(\SebastianBergmann\Comparator\Factory $factory) - { - } - /** - * Returns whether the comparator can compare two values. - * - * @param mixed $expected The first value to compare - * @param mixed $actual The second value to compare - * - * @return bool - */ - abstract public function accepts($expected, $actual); - /** - * Asserts that two values are equal. - * - * @param mixed $expected First value to compare - * @param mixed $actual Second value to compare - * @param float $delta Allowed numerical distance between two values to consider them equal - * @param bool $canonicalize Arrays are sorted before comparison when set to true - * @param bool $ignoreCase Case is ignored when set to true - * - * @throws ComparisonFailure - */ - abstract public function assertEquals($expected, $actual, $delta = 0.0, $canonicalize = false, $ignoreCase = false); -} -/** - * Thrown when an assertion for string equality failed. - */ -class ComparisonFailure extends \RuntimeException -{ - /** - * Expected value of the retrieval which does not match $actual. - * - * @var mixed - */ - protected $expected; - /** - * Actually retrieved value which does not match $expected. - * - * @var mixed - */ - protected $actual; - /** - * The string representation of the expected value. - * - * @var string - */ - protected $expectedAsString; - /** - * The string representation of the actual value. - * - * @var string - */ - protected $actualAsString; - /** - * @var bool - */ - protected $identical; - /** - * Optional message which is placed in front of the first line - * returned by toString(). - * - * @var string - */ - protected $message; - /** - * Initialises with the expected value and the actual value. - * - * @param mixed $expected expected value retrieved - * @param mixed $actual actual value retrieved - * @param string $expectedAsString - * @param string $actualAsString - * @param bool $identical - * @param string $message a string which is prefixed on all returned lines - * in the difference output - */ - public function __construct($expected, $actual, $expectedAsString, $actualAsString, $identical = false, $message = '') - { - } - public function getActual() - { - } - public function getExpected() - { - } - /** - * @return string - */ - public function getActualAsString() - { - } - /** - * @return string - */ - public function getExpectedAsString() - { - } +/** + * Compares scalar or NULL values for equality. + */ +class ScalarComparator extends \SebastianBergmann\Comparator\Comparator +{ /** - * @return string + * Returns whether the comparator can compare two values. + * + * @param mixed $expected The first value to compare + * @param mixed $actual The second value to compare + * + * @return bool + * + * @since Method available since Release 3.6.0 */ - public function getDiff() + public function accepts($expected, $actual) { } /** - * @return string + * Asserts that two values are equal. + * + * @param mixed $expected First value to compare + * @param mixed $actual Second value to compare + * @param float $delta Allowed numerical distance between two values to consider them equal + * @param bool $canonicalize Arrays are sorted before comparison when set to true + * @param bool $ignoreCase Case is ignored when set to true + * + * @throws ComparisonFailure */ - public function toString() + public function assertEquals($expected, $actual, $delta = 0.0, $canonicalize = false, $ignoreCase = false) { } } @@ -16960,13 +16962,9 @@ public function assertEquals($expected, $actual, $delta = 0.0, $canonicalize = f } } /** - * Compares arrays for equality. - * - * Arrays are equal if they contain the same key-value pairs. - * The order of the keys does not matter. - * The types of key-value pairs do not matter. + * Compares values for type equality. */ -class ArrayComparator extends \SebastianBergmann\Comparator\Comparator +class TypeComparator extends \SebastianBergmann\Comparator\Comparator { /** * Returns whether the comparator can compare two values. @@ -16980,52 +16978,92 @@ public function accepts($expected, $actual) { } /** - * Asserts that two arrays are equal. + * Asserts that two values are equal. * * @param mixed $expected First value to compare * @param mixed $actual Second value to compare * @param float $delta Allowed numerical distance between two values to consider them equal * @param bool $canonicalize Arrays are sorted before comparison when set to true * @param bool $ignoreCase Case is ignored when set to true - * @param array $processed List of already processed elements (used to prevent infinite recursion) * * @throws ComparisonFailure */ - public function assertEquals($expected, $actual, $delta = 0.0, $canonicalize = false, $ignoreCase = false, array &$processed = []) - { - } - protected function indent($lines) + public function assertEquals($expected, $actual, $delta = 0.0, $canonicalize = false, $ignoreCase = false) { } } +interface Exception extends \Throwable +{ +} +final class RuntimeException extends \RuntimeException implements \SebastianBergmann\Comparator\Exception +{ +} namespace SebastianBergmann\Complexity; -final class ComplexityCalculatingVisitor extends \PhpParser\NodeVisitorAbstract +final class Calculator { - public function __construct(bool $shortCircuitTraversal) + /** + * @throws RuntimeException + */ + public function calculateForSourceFile(string $sourceFile): \SebastianBergmann\Complexity\ComplexityCollection { } - public function enterNode(\PhpParser\Node $node): ?int + /** + * @throws RuntimeException + */ + public function calculateForSourceString(string $source): \SebastianBergmann\Complexity\ComplexityCollection { } - public function result(): \SebastianBergmann\Complexity\ComplexityCollection + /** + * @param \PhpParser\Node[] $nodes + * + * @throws RuntimeException + */ + public function calculateForAbstractSyntaxTree(array $nodes): \SebastianBergmann\Complexity\ComplexityCollection { } } -final class CyclomaticComplexityCalculatingVisitor extends \PhpParser\NodeVisitorAbstract +/** + * @phan-side-effect-free + */ +final class Complexity { - public function enterNode(\PhpParser\Node $node): void + public function __construct(string $name, int $cyclomaticComplexity) + { + } + public function name(): string { } public function cyclomaticComplexity(): int { } } -final class RuntimeException extends \RuntimeException implements \SebastianBergmann\Complexity\Exception -{ -} -interface Exception extends \Throwable +/** + * @phan-side-effect-free + */ +final class ComplexityCollection implements \Countable, \IteratorAggregate { + public static function fromList(\SebastianBergmann\Complexity\Complexity ...$items): self + { + } + /** + * @phan-return list + */ + public function asArray(): array + { + } + public function getIterator(): \SebastianBergmann\Complexity\ComplexityCollectionIterator + { + } + public function count(): int + { + } + public function isEmpty(): bool + { + } + public function cyclomaticComplexity(): int + { + } } final class ComplexityCollectionIterator implements \Iterator { @@ -17048,85 +17086,65 @@ public function next(): void { } } -/** - * @phan-side-effect-free - */ -final class ComplexityCollection implements \Countable, \IteratorAggregate +interface Exception extends \Throwable { - public static function fromList(\SebastianBergmann\Complexity\Complexity ...$items): self - { - } - /** - * @phan-return list - */ - public function asArray(): array +} +final class RuntimeException extends \RuntimeException implements \SebastianBergmann\Complexity\Exception +{ +} +final class ComplexityCalculatingVisitor extends \PhpParser\NodeVisitorAbstract +{ + public function __construct(bool $shortCircuitTraversal) { } - public function getIterator(): \SebastianBergmann\Complexity\ComplexityCollectionIterator + public function enterNode(\PhpParser\Node $node): ?int { } - public function count(): int + public function result(): \SebastianBergmann\Complexity\ComplexityCollection { } - public function isEmpty(): bool +} +final class CyclomaticComplexityCalculatingVisitor extends \PhpParser\NodeVisitorAbstract +{ + public function enterNode(\PhpParser\Node $node): void { } public function cyclomaticComplexity(): int { } } -/** - * @phan-side-effect-free - */ -final class Complexity +namespace SebastianBergmann\Diff; + +final class Chunk { - public function __construct(string $name, int $cyclomaticComplexity) + public function __construct(int $start = 0, int $startRange = 1, int $end = 0, int $endRange = 1, array $lines = []) { } - public function name(): string + public function getStart(): int { } - public function cyclomaticComplexity(): int + public function getStartRange(): int { } -} -final class Calculator -{ - /** - * @throws RuntimeException - */ - public function calculateForSourceFile(string $sourceFile): \SebastianBergmann\Complexity\ComplexityCollection + public function getEnd(): int { } - /** - * @throws RuntimeException - */ - public function calculateForSourceString(string $source): \SebastianBergmann\Complexity\ComplexityCollection + public function getEndRange(): int { } /** - * @param \PhpParser\Node[] $nodes - * - * @throws RuntimeException + * @return Line[] */ - public function calculateForAbstractSyntaxTree(array $nodes): \SebastianBergmann\Complexity\ComplexityCollection + public function getLines(): array { } -} -namespace SebastianBergmann\Diff; - -class InvalidArgumentException extends \InvalidArgumentException implements \SebastianBergmann\Diff\Exception -{ -} -final class ConfigurationException extends \SebastianBergmann\Diff\InvalidArgumentException -{ - public function __construct(string $option, string $expected, $value, int $code = 0, ?\Exception $previous = null) + /** + * @param Line[] $lines + */ + public function setLines(array $lines): void { } } -interface Exception extends \Throwable -{ -} final class Diff { /** @@ -17154,22 +17172,6 @@ public function setChunks(array $chunks): void { } } -interface LongestCommonSubsequenceCalculator -{ - /** - * Calculates the longest common subsequence of two arrays. - */ - public function calculate(array $from, array $to): array; -} -final class TimeEfficientLongestCommonSubsequenceCalculator implements \SebastianBergmann\Diff\LongestCommonSubsequenceCalculator -{ - /** - * {@inheritdoc} - */ - public function calculate(array $from, array $to): array - { - } -} final class Differ { public const OLD = 0; @@ -17213,6 +17215,18 @@ public function diffToArray($from, $to, ?\SebastianBergmann\Diff\LongestCommonSu { } } +final class ConfigurationException extends \SebastianBergmann\Diff\InvalidArgumentException +{ + public function __construct(string $option, string $expected, $value, int $code = 0, ?\Exception $previous = null) + { + } +} +interface Exception extends \Throwable +{ +} +class InvalidArgumentException extends \InvalidArgumentException implements \SebastianBergmann\Diff\Exception +{ +} final class Line { public const ADDED = 1; @@ -17228,73 +17242,45 @@ public function getType(): int { } } -final class MemoryEfficientLongestCommonSubsequenceCalculator implements \SebastianBergmann\Diff\LongestCommonSubsequenceCalculator -{ - /** - * {@inheritdoc} - */ - public function calculate(array $from, array $to): array - { - } -} -/** - * Unified diff parser. - */ -final class Parser +interface LongestCommonSubsequenceCalculator { /** - * @return Diff[] + * Calculates the longest common subsequence of two arrays. */ - public function parse(string $string): array - { - } + public function calculate(array $from, array $to): array; } -final class Chunk -{ - public function __construct(int $start = 0, int $startRange = 1, int $end = 0, int $endRange = 1, array $lines = []) - { - } - public function getStart(): int - { - } - public function getStartRange(): int - { - } - public function getEnd(): int - { - } - public function getEndRange(): int - { - } - /** - * @return Line[] - */ - public function getLines(): array - { - } +final class MemoryEfficientLongestCommonSubsequenceCalculator implements \SebastianBergmann\Diff\LongestCommonSubsequenceCalculator +{ /** - * @param Line[] $lines + * {@inheritdoc} */ - public function setLines(array $lines): void + public function calculate(array $from, array $to): array { } } -namespace SebastianBergmann\Diff\Output; - /** - * Strict Unified diff output builder. - * - * Generates (strict) Unified diff's (unidiffs) with hunks. + * Unified diff parser. */ -final class StrictUnifiedDiffOutputBuilder implements \SebastianBergmann\Diff\Output\DiffOutputBuilderInterface +final class Parser { - public function __construct(array $options = []) + /** + * @return Diff[] + */ + public function parse(string $string): array { } - public function getDiff(array $diff): string +} +final class TimeEfficientLongestCommonSubsequenceCalculator implements \SebastianBergmann\Diff\LongestCommonSubsequenceCalculator +{ + /** + * {@inheritdoc} + */ + public function calculate(array $from, array $to): array { } } +namespace SebastianBergmann\Diff\Output; + abstract class AbstractChunkOutputBuilder implements \SebastianBergmann\Diff\Output\DiffOutputBuilderInterface { /** @@ -17305,6 +17291,19 @@ protected function getCommonChunks(array $diff, int $lineThreshold = 5): array { } } +/** + * Builds a diff string representation in a loose unified diff format + * listing only changes lines. Does not include line numbers. + */ +final class DiffOnlyOutputBuilder implements \SebastianBergmann\Diff\Output\DiffOutputBuilderInterface +{ + public function __construct(string $header = "--- Original\n+++ New\n") + { + } + public function getDiff(array $diff): string + { + } +} /** * Defines how an output builder should take a generated * diff array and return a string representation of that diff. @@ -17314,11 +17313,13 @@ interface DiffOutputBuilderInterface public function getDiff(array $diff): string; } /** - * Builds a diff string representation in unified diff format in chunks. + * Strict Unified diff output builder. + * + * Generates (strict) Unified diff's (unidiffs) with hunks. */ -final class UnifiedDiffOutputBuilder extends \SebastianBergmann\Diff\Output\AbstractChunkOutputBuilder +final class StrictUnifiedDiffOutputBuilder implements \SebastianBergmann\Diff\Output\DiffOutputBuilderInterface { - public function __construct(string $header = "--- Original\n+++ New\n", bool $addLineNumbers = false) + public function __construct(array $options = []) { } public function getDiff(array $diff): string @@ -17326,12 +17327,11 @@ public function getDiff(array $diff): string } } /** - * Builds a diff string representation in a loose unified diff format - * listing only changes lines. Does not include line numbers. + * Builds a diff string representation in unified diff format in chunks. */ -final class DiffOnlyOutputBuilder implements \SebastianBergmann\Diff\Output\DiffOutputBuilderInterface +final class UnifiedDiffOutputBuilder extends \SebastianBergmann\Diff\Output\AbstractChunkOutputBuilder { - public function __construct(string $header = "--- Original\n+++ New\n") + public function __construct(string $header = "--- Original\n+++ New\n", bool $addLineNumbers = false) { } public function getDiff(array $diff): string @@ -17340,6 +17340,59 @@ public function getDiff(array $diff): string } namespace SebastianBergmann\Environment; +final class Console +{ + /** + * @var int + */ + public const STDIN = 0; + /** + * @var int + */ + public const STDOUT = 1; + /** + * @var int + */ + public const STDERR = 2; + /** + * Returns true if STDOUT supports colorization. + * + * This code has been copied and adapted from + * Symfony\Component\Console\Output\StreamOutput. + */ + public function hasColorSupport(): bool + { + } + /** + * Returns the number of columns of the terminal. + * + * @codeCoverageIgnore + */ + public function getNumberOfColumns(): int + { + } + /** + * Returns if the file descriptor is an interactive terminal or not. + * + * Normally, we want to use a resource as a parameter, yet sadly it's not always awailable, + * eg when running code in interactive console (`php -a`), STDIN/STDOUT/STDERR constants are not defined. + * + * @param int|resource $fileDescriptor + */ + public function isInteractive($fileDescriptor = self::STDOUT): bool + { + } +} +final class OperatingSystem +{ + /** + * Returns PHP_OS_FAMILY (if defined (which it is on PHP >= 7.2)). + * Returns a string (compatible with PHP_OS_FAMILY) derived from PHP_OS otherwise. + */ + public function getFamily(): string + { + } +} /** * Utility class for HHVM/PHP environment handling. */ @@ -17441,59 +17494,6 @@ public function getCurrentSettings(array $values): array { } } -final class OperatingSystem -{ - /** - * Returns PHP_OS_FAMILY (if defined (which it is on PHP >= 7.2)). - * Returns a string (compatible with PHP_OS_FAMILY) derived from PHP_OS otherwise. - */ - public function getFamily(): string - { - } -} -final class Console -{ - /** - * @var int - */ - public const STDIN = 0; - /** - * @var int - */ - public const STDOUT = 1; - /** - * @var int - */ - public const STDERR = 2; - /** - * Returns true if STDOUT supports colorization. - * - * This code has been copied and adapted from - * Symfony\Component\Console\Output\StreamOutput. - */ - public function hasColorSupport(): bool - { - } - /** - * Returns the number of columns of the terminal. - * - * @codeCoverageIgnore - */ - public function getNumberOfColumns(): int - { - } - /** - * Returns if the file descriptor is an interactive terminal or not. - * - * Normally, we want to use a resource as a parameter, yet sadly it's not always awailable, - * eg when running code in interactive console (`php -a`), STDIN/STDOUT/STDERR constants are not defined. - * - * @param int|resource $fileDescriptor - */ - public function isInteractive($fileDescriptor = self::STDOUT): bool - { - } -} namespace SebastianBergmann\Exporter; /** @@ -17580,6 +17580,20 @@ protected function recursiveExport(&$value, $indentation, $processed = null) } namespace SebastianBergmann\FileIterator; +class Facade +{ + /** + * @param array|string $paths + * @param array|string $suffixes + * @param array|string $prefixes + */ + public function getFilesAsArray($paths, $suffixes = '', $prefixes = '', array $exclude = [], bool $commonPath = false): array + { + } + protected function getCommonPath(array $files): string + { + } +} class Factory { /** @@ -17605,28 +17619,8 @@ public function accept(): bool { } } -class Facade -{ - /** - * @param array|string $paths - * @param array|string $suffixes - * @param array|string $prefixes - */ - public function getFilesAsArray($paths, $suffixes = '', $prefixes = '', array $exclude = [], bool $commonPath = false): array - { - } - protected function getCommonPath(array $files): string - { - } -} namespace SebastianBergmann\GlobalState; -final class RuntimeException extends \RuntimeException implements \SebastianBergmann\GlobalState\Exception -{ -} -interface Exception extends \Throwable -{ -} /** * Exports parts of a Snapshot as PHP code. */ @@ -17642,6 +17636,33 @@ public function iniSettings(\SebastianBergmann\GlobalState\Snapshot $snapshot): { } } +final class ExcludeList +{ + public function addGlobalVariable(string $variableName): void + { + } + public function addClass(string $className): void + { + } + public function addSubclassesOf(string $className): void + { + } + public function addImplementorsOf(string $interfaceName): void + { + } + public function addClassNamePrefix(string $classNamePrefix): void + { + } + public function addStaticAttribute(string $className, string $attributeName): void + { + } + public function isGlobalVariableExcluded(string $variableName): bool + { + } + public function isStaticAttributeExcluded(string $className, string $attributeName): bool + { + } +} /** * Restorer of snapshots of global state. */ @@ -17718,44 +17739,14 @@ public function traits(): array { } } -final class ExcludeList -{ - public function addGlobalVariable(string $variableName): void - { - } - public function addClass(string $className): void - { - } - public function addSubclassesOf(string $className): void - { - } - public function addImplementorsOf(string $interfaceName): void - { - } - public function addClassNamePrefix(string $classNamePrefix): void - { - } - public function addStaticAttribute(string $className, string $attributeName): void - { - } - public function isGlobalVariableExcluded(string $variableName): bool - { - } - public function isStaticAttributeExcluded(string $className, string $attributeName): bool - { - } -} -namespace SebastianBergmann\Invoker; - -final class ProcessControlExtensionNotLoadedException extends \RuntimeException implements \SebastianBergmann\Invoker\Exception -{ -} interface Exception extends \Throwable { } -final class TimeoutException extends \RuntimeException implements \SebastianBergmann\Invoker\Exception +final class RuntimeException extends \RuntimeException implements \SebastianBergmann\GlobalState\Exception { } +namespace SebastianBergmann\Invoker; + final class Invoker { /** @@ -17768,20 +17759,17 @@ public function canInvokeWithTimeout(): bool { } } -namespace SebastianBergmann\LinesOfCode; - -final class RuntimeException extends \RuntimeException implements \SebastianBergmann\LinesOfCode\Exception -{ -} -final class IllogicalValuesException extends \LogicException implements \SebastianBergmann\LinesOfCode\Exception +interface Exception extends \Throwable { } -final class NegativeValueException extends \InvalidArgumentException implements \SebastianBergmann\LinesOfCode\Exception +final class ProcessControlExtensionNotLoadedException extends \RuntimeException implements \SebastianBergmann\Invoker\Exception { } -interface Exception extends \Throwable +final class TimeoutException extends \RuntimeException implements \SebastianBergmann\Invoker\Exception { } +namespace SebastianBergmann\LinesOfCode; + final class Counter { /** @@ -17805,6 +17793,18 @@ public function countInAbstractSyntaxTree(int $linesOfCode, array $nodes): \Seba { } } +interface Exception extends \Throwable +{ +} +final class IllogicalValuesException extends \LogicException implements \SebastianBergmann\LinesOfCode\Exception +{ +} +final class NegativeValueException extends \InvalidArgumentException implements \SebastianBergmann\LinesOfCode\Exception +{ +} +final class RuntimeException extends \RuntimeException implements \SebastianBergmann\LinesOfCode\Exception +{ +} final class LineCountingVisitor extends \PhpParser\NodeVisitorAbstract { public function __construct(int $linesOfCode) @@ -17847,12 +17847,6 @@ public function plus(self $other): self } namespace SebastianBergmann\ObjectEnumerator; -class InvalidArgumentException extends \InvalidArgumentException implements \SebastianBergmann\ObjectEnumerator\Exception -{ -} -interface Exception extends \Throwable -{ -} /** * Traverses array structures and object graphs * to enumerate all referenced objects. @@ -17871,12 +17865,18 @@ public function enumerate($variable, ...$func_get_args) { } } +interface Exception extends \Throwable +{ +} +class InvalidArgumentException extends \InvalidArgumentException implements \SebastianBergmann\ObjectEnumerator\Exception +{ +} namespace SebastianBergmann\ObjectReflector; -class InvalidArgumentException extends \InvalidArgumentException implements \SebastianBergmann\ObjectReflector\Exception +interface Exception extends \Throwable { } -interface Exception extends \Throwable +class InvalidArgumentException extends \InvalidArgumentException implements \SebastianBergmann\ObjectReflector\Exception { } class ObjectReflector @@ -17943,10 +17943,10 @@ public function contains(&$value) { } } -final class InvalidArgumentException extends \InvalidArgumentException implements \SebastianBergmann\RecursionContext\Exception +interface Exception extends \Throwable { } -interface Exception extends \Throwable +final class InvalidArgumentException extends \InvalidArgumentException implements \SebastianBergmann\RecursionContext\Exception { } namespace SebastianBergmann\ResourceOperations; @@ -17962,15 +17962,6 @@ public static function getFunctions(): array } namespace SebastianBergmann\Template; -final class RuntimeException extends \InvalidArgumentException implements \SebastianBergmann\Template\Exception -{ -} -final class InvalidArgumentException extends \InvalidArgumentException implements \SebastianBergmann\Template\Exception -{ -} -interface Exception extends \Throwable -{ -} final class Template { /** @@ -17998,29 +17989,17 @@ public function renderTo(string $target): void { } } -namespace SebastianBergmann\Timer; - -final class TimeSinceStartOfRequestNotAvailableException extends \RuntimeException implements \SebastianBergmann\Timer\Exception -{ -} -final class NoActiveTimerException extends \LogicException implements \SebastianBergmann\Timer\Exception +interface Exception extends \Throwable { } -interface Exception extends \Throwable +final class InvalidArgumentException extends \InvalidArgumentException implements \SebastianBergmann\Template\Exception { } -final class Timer +final class RuntimeException extends \InvalidArgumentException implements \SebastianBergmann\Template\Exception { - public function start(): void - { - } - /** - * @throws NoActiveTimerException - */ - public function stop(): \SebastianBergmann\Timer\Duration - { - } } +namespace SebastianBergmann\Timer; + /** * @phan-side-effect-free */ @@ -18060,197 +18039,131 @@ public function resourceUsageSinceStartOfRequest(): string { } } -namespace SebastianBergmann\Type; - -final class GenericObjectType extends \SebastianBergmann\Type\Type +final class Timer { - public function __construct(bool $nullable) - { - } - public function isAssignable(\SebastianBergmann\Type\Type $other): bool - { - } - public function name(): string - { - } - public function allowsNull(): bool + public function start(): void { } /** - * @psalm-assert-if-true GenericObjectType $this + * @throws NoActiveTimerException */ - public function isGenericObject(): bool + public function stop(): \SebastianBergmann\Timer\Duration { } } -final class UnionType extends \SebastianBergmann\Type\Type +interface Exception extends \Throwable +{ +} +final class NoActiveTimerException extends \LogicException implements \SebastianBergmann\Timer\Exception +{ +} +final class TimeSinceStartOfRequestNotAvailableException extends \RuntimeException implements \SebastianBergmann\Timer\Exception +{ +} +namespace SebastianBergmann\Type; + +final class Parameter { /** - * @throws RuntimeException + * @phan-param non-empty-string $name */ - public function __construct(\SebastianBergmann\Type\Type ...$types) - { - } - public function isAssignable(\SebastianBergmann\Type\Type $other): bool - { - } - public function asString(): string + public function __construct(string $name, \SebastianBergmann\Type\Type $type) { } public function name(): string { } - public function allowsNull(): bool - { - } - /** - * @psalm-assert-if-true UnionType $this - */ - public function isUnion(): bool - { - } - public function containsIntersectionTypes(): bool - { - } - /** - * @phan-return non-empty-list - */ - public function types(): array + public function type(): \SebastianBergmann\Type\Type { } } -final class ObjectType extends \SebastianBergmann\Type\Type +final class ReflectionMapper { - public function __construct(\SebastianBergmann\Type\TypeName $className, bool $allowsNull) - { - } - public function isAssignable(\SebastianBergmann\Type\Type $other): bool - { - } - public function name(): string - { - } - public function allowsNull(): bool - { - } - public function className(): \SebastianBergmann\Type\TypeName - { - } /** - * @psalm-assert-if-true ObjectType $this + * @phan-return list */ - public function isObject(): bool - { - } -} -abstract class Type -{ - public static function fromValue($value, bool $allowsNull): self + public function fromParameterTypes(\ReflectionFunctionAbstract $functionOrMethod): array { } - public static function fromName(string $typeName, bool $allowsNull): self + public function fromReturnType(\ReflectionFunctionAbstract $functionOrMethod): \SebastianBergmann\Type\Type { } - public function asString(): string +} +final class TypeName +{ + public static function fromQualifiedName(string $fullClassName): self { } - /** - * @psalm-assert-if-true CallableType $this - */ - public function isCallable(): bool + public static function fromReflection(\ReflectionClass $type): self { } - /** - * @psalm-assert-if-true TrueType $this - */ - public function isTrue(): bool + public function __construct(?string $namespaceName, string $simpleName) { } - /** - * @psalm-assert-if-true FalseType $this - */ - public function isFalse(): bool + public function namespaceName(): ?string { } - /** - * @psalm-assert-if-true GenericObjectType $this - */ - public function isGenericObject(): bool + public function simpleName(): string { } - /** - * @psalm-assert-if-true IntersectionType $this - */ - public function isIntersection(): bool + public function qualifiedName(): string { } - /** - * @psalm-assert-if-true IterableType $this - */ - public function isIterable(): bool + public function isNamespaced(): bool { } - /** - * @psalm-assert-if-true MixedType $this - */ - public function isMixed(): bool +} +interface Exception extends \Throwable +{ +} +final class RuntimeException extends \RuntimeException implements \SebastianBergmann\Type\Exception +{ +} +final class CallableType extends \SebastianBergmann\Type\Type +{ + public function __construct(bool $nullable) { } /** - * @psalm-assert-if-true NeverType $this + * @throws RuntimeException */ - public function isNever(): bool + public function isAssignable(\SebastianBergmann\Type\Type $other): bool { } - /** - * @psalm-assert-if-true NullType $this - */ - public function isNull(): bool + public function name(): string { } - /** - * @psalm-assert-if-true ObjectType $this - */ - public function isObject(): bool + public function allowsNull(): bool { } /** - * @psalm-assert-if-true SimpleType $this + * @psalm-assert-if-true CallableType $this */ - public function isSimple(): bool + public function isCallable(): bool { } - /** - * @psalm-assert-if-true StaticType $this - */ - public function isStatic(): bool +} +final class FalseType extends \SebastianBergmann\Type\Type +{ + public function isAssignable(\SebastianBergmann\Type\Type $other): bool { } - /** - * @psalm-assert-if-true UnionType $this - */ - public function isUnion(): bool + public function name(): string { } - /** - * @psalm-assert-if-true UnknownType $this - */ - public function isUnknown(): bool + public function allowsNull(): bool { } /** - * @psalm-assert-if-true VoidType $this + * @psalm-assert-if-true FalseType $this */ - public function isVoid(): bool + public function isFalse(): bool { } - abstract public function isAssignable(self $other): bool; - abstract public function name(): string; - abstract public function allowsNull(): bool; } -final class SimpleType extends \SebastianBergmann\Type\Type +final class GenericObjectType extends \SebastianBergmann\Type\Type { - public function __construct(string $name, bool $nullable, $value = null) + public function __construct(bool $nullable) { } public function isAssignable(\SebastianBergmann\Type\Type $other): bool @@ -18262,21 +18175,27 @@ public function name(): string public function allowsNull(): bool { } - public function value() - { - } /** - * @psalm-assert-if-true SimpleType $this + * @psalm-assert-if-true GenericObjectType $this */ - public function isSimple(): bool + public function isGenericObject(): bool { } } -final class VoidType extends \SebastianBergmann\Type\Type +final class IntersectionType extends \SebastianBergmann\Type\Type { + /** + * @throws RuntimeException + */ + public function __construct(\SebastianBergmann\Type\Type ...$types) + { + } public function isAssignable(\SebastianBergmann\Type\Type $other): bool { } + public function asString(): string + { + } public function name(): string { } @@ -18284,9 +18203,15 @@ public function allowsNull(): bool { } /** - * @psalm-assert-if-true VoidType $this + * @psalm-assert-if-true IntersectionType $this */ - public function isVoid(): bool + public function isIntersection(): bool + { + } + /** + * @phan-return non-empty-list + */ + public function types(): array { } } @@ -18314,11 +18239,14 @@ public function isIterable(): bool { } } -final class NeverType extends \SebastianBergmann\Type\Type +final class MixedType extends \SebastianBergmann\Type\Type { public function isAssignable(\SebastianBergmann\Type\Type $other): bool { } + public function asString(): string + { + } public function name(): string { } @@ -18326,20 +18254,17 @@ public function allowsNull(): bool { } /** - * @psalm-assert-if-true NeverType $this + * @psalm-assert-if-true MixedType $this */ - public function isNever(): bool + public function isMixed(): bool { } } -final class MixedType extends \SebastianBergmann\Type\Type +final class NeverType extends \SebastianBergmann\Type\Type { public function isAssignable(\SebastianBergmann\Type\Type $other): bool { } - public function asString(): string - { - } public function name(): string { } @@ -18347,9 +18272,9 @@ public function allowsNull(): bool { } /** - * @psalm-assert-if-true MixedType $this + * @psalm-assert-if-true NeverType $this */ - public function isMixed(): bool + public function isNever(): bool { } } @@ -18374,8 +18299,11 @@ public function isNull(): bool { } } -final class TrueType extends \SebastianBergmann\Type\Type +final class ObjectType extends \SebastianBergmann\Type\Type { + public function __construct(\SebastianBergmann\Type\TypeName $className, bool $allowsNull) + { + } public function isAssignable(\SebastianBergmann\Type\Type $other): bool { } @@ -18385,36 +18313,45 @@ public function name(): string public function allowsNull(): bool { } + public function className(): \SebastianBergmann\Type\TypeName + { + } /** - * @psalm-assert-if-true TrueType $this + * @psalm-assert-if-true ObjectType $this */ - public function isTrue(): bool + public function isObject(): bool { } } -final class UnknownType extends \SebastianBergmann\Type\Type +final class SimpleType extends \SebastianBergmann\Type\Type { + public function __construct(string $name, bool $nullable, $value = null) + { + } public function isAssignable(\SebastianBergmann\Type\Type $other): bool { } public function name(): string { } - public function asString(): string + public function allowsNull(): bool { } - public function allowsNull(): bool + public function value() { } /** - * @psalm-assert-if-true UnknownType $this + * @psalm-assert-if-true SimpleType $this */ - public function isUnknown(): bool + public function isSimple(): bool { } } -final class FalseType extends \SebastianBergmann\Type\Type +final class StaticType extends \SebastianBergmann\Type\Type { + public function __construct(\SebastianBergmann\Type\TypeName $className, bool $allowsNull) + { + } public function isAssignable(\SebastianBergmann\Type\Type $other): bool { } @@ -18425,144 +18362,207 @@ public function allowsNull(): bool { } /** - * @psalm-assert-if-true FalseType $this + * @psalm-assert-if-true StaticType $this */ - public function isFalse(): bool + public function isStatic(): bool { } } -final class IntersectionType extends \SebastianBergmann\Type\Type +final class TrueType extends \SebastianBergmann\Type\Type { + public function isAssignable(\SebastianBergmann\Type\Type $other): bool + { + } + public function name(): string + { + } + public function allowsNull(): bool + { + } /** - * @throws RuntimeException + * @psalm-assert-if-true TrueType $this */ - public function __construct(\SebastianBergmann\Type\Type ...$types) + public function isTrue(): bool { } - public function isAssignable(\SebastianBergmann\Type\Type $other): bool +} +abstract class Type +{ + public static function fromValue($value, bool $allowsNull): self + { + } + public static function fromName(string $typeName, bool $allowsNull): self { } public function asString(): string { } - public function name(): string + /** + * @psalm-assert-if-true CallableType $this + */ + public function isCallable(): bool { } - public function allowsNull(): bool + /** + * @psalm-assert-if-true TrueType $this + */ + public function isTrue(): bool { } /** - * @psalm-assert-if-true IntersectionType $this + * @psalm-assert-if-true FalseType $this */ - public function isIntersection(): bool + public function isFalse(): bool { } /** - * @phan-return non-empty-list + * @psalm-assert-if-true GenericObjectType $this */ - public function types(): array + public function isGenericObject(): bool { } -} -final class StaticType extends \SebastianBergmann\Type\Type -{ - public function __construct(\SebastianBergmann\Type\TypeName $className, bool $allowsNull) + /** + * @psalm-assert-if-true IntersectionType $this + */ + public function isIntersection(): bool { } - public function isAssignable(\SebastianBergmann\Type\Type $other): bool + /** + * @psalm-assert-if-true IterableType $this + */ + public function isIterable(): bool { } - public function name(): string + /** + * @psalm-assert-if-true MixedType $this + */ + public function isMixed(): bool { } - public function allowsNull(): bool + /** + * @psalm-assert-if-true NeverType $this + */ + public function isNever(): bool { } /** - * @psalm-assert-if-true StaticType $this + * @psalm-assert-if-true NullType $this */ - public function isStatic(): bool + public function isNull(): bool { } -} -final class CallableType extends \SebastianBergmann\Type\Type -{ - public function __construct(bool $nullable) + /** + * @psalm-assert-if-true ObjectType $this + */ + public function isObject(): bool { } /** - * @throws RuntimeException + * @psalm-assert-if-true SimpleType $this */ - public function isAssignable(\SebastianBergmann\Type\Type $other): bool + public function isSimple(): bool { } - public function name(): string + /** + * @psalm-assert-if-true StaticType $this + */ + public function isStatic(): bool { } - public function allowsNull(): bool + /** + * @psalm-assert-if-true UnionType $this + */ + public function isUnion(): bool { } /** - * @psalm-assert-if-true CallableType $this + * @psalm-assert-if-true UnknownType $this */ - public function isCallable(): bool + public function isUnknown(): bool + { + } + /** + * @psalm-assert-if-true VoidType $this + */ + public function isVoid(): bool { } + abstract public function isAssignable(self $other): bool; + abstract public function name(): string; + abstract public function allowsNull(): bool; } -final class Parameter +final class UnionType extends \SebastianBergmann\Type\Type { /** - * @phan-param non-empty-string $name + * @throws RuntimeException */ - public function __construct(string $name, \SebastianBergmann\Type\Type $type) + public function __construct(\SebastianBergmann\Type\Type ...$types) + { + } + public function isAssignable(\SebastianBergmann\Type\Type $other): bool + { + } + public function asString(): string { } public function name(): string { } - public function type(): \SebastianBergmann\Type\Type + public function allowsNull(): bool { } -} -final class ReflectionMapper -{ /** - * @phan-return list + * @psalm-assert-if-true UnionType $this */ - public function fromParameterTypes(\ReflectionFunctionAbstract $functionOrMethod): array + public function isUnion(): bool { } - public function fromReturnType(\ReflectionFunctionAbstract $functionOrMethod): \SebastianBergmann\Type\Type + public function containsIntersectionTypes(): bool + { + } + /** + * @phan-return non-empty-list + */ + public function types(): array { } } -final class RuntimeException extends \RuntimeException implements \SebastianBergmann\Type\Exception -{ -} -interface Exception extends \Throwable -{ -} -final class TypeName +final class UnknownType extends \SebastianBergmann\Type\Type { - public static function fromQualifiedName(string $fullClassName): self + public function isAssignable(\SebastianBergmann\Type\Type $other): bool { } - public static function fromReflection(\ReflectionClass $type): self + public function name(): string { } - public function __construct(?string $namespaceName, string $simpleName) + public function asString(): string { } - public function namespaceName(): ?string + public function allowsNull(): bool { } - public function simpleName(): string + /** + * @psalm-assert-if-true UnknownType $this + */ + public function isUnknown(): bool { } - public function qualifiedName(): string +} +final class VoidType extends \SebastianBergmann\Type\Type +{ + public function isAssignable(\SebastianBergmann\Type\Type $other): bool { } - public function isNamespaced(): bool + public function name(): string + { + } + public function allowsNull(): bool + { + } + /** + * @psalm-assert-if-true VoidType $this + */ + public function isVoid(): bool { } } diff --git a/.phan/stubs/woocommerce-internal-stubs.php b/.phan/stubs/woocommerce-internal-stubs.php index 330a6276638b6..c3eb561a77ca4 100644 --- a/.phan/stubs/woocommerce-internal-stubs.php +++ b/.phan/stubs/woocommerce-internal-stubs.php @@ -1,6 +1,6 @@