art of PHPUnit.
 *
 * (c) Sebastian Bergmann <sebastian@phpunit.de>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */
namespace PHPUnit\Framework\Constraint;

use const NAN;
use function acos;
use function log;
use PHPUnit\Framework\Attributes\CoversClass;
use PHPUnit\Framework\Attributes\Group;
use PHPUnit\Framework\Attributes\Small;
use PHPUnit\Framework\ExpectationFailedException;
use PHPUnit\Framework\TestCase;

#[Covers

aint = new IsNan;

        $this->assertTrue($constraint->evaluate(acos(2), returnResult: true));
        $this->assertFalse($constraint->evaluate(log(0), returnResult: true));
        $this->assertFalse($constraint->evaluate(1, returnResult: true));
    }

Class(IsNan::class)]
#[CoversClass(Constraint::class)]
#[Small]
#[Group('framework')]
#[Group('framework/constraints')]
final class IsNanTest extends TestCase
{
    public function testCanBeEvaluated(): void
    {
        $constr


tian@phpunit.de>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */
namespace PHPUnit\Framework\Constraint;

use PHPUnit\Framework\Attributes\CoversClass;
use PHPUnit\Framework\Attributes\Group;
use PHPUnit\Framework\Attributes\Small;
use PHPUnit\Framework\ExpectationFailedException;
use PHPUnit\Framework\TestCase;
use stdClass;

#[CoversClass(ObjectHasProperty::class)]
#[Small]
#[Group('framework')]
#[Group('framework/constr

ss;
        $objectWithProperty->theProperty = 'value';

        $this->assertTrue($constraint->evaluate($objectWithProperty, returnResult: true));
        $this->assertFalse($constraint->evaluate(new stdClass, returnResult: true));
        $this->assertFa

aints')]
final class ObjectHasPropertyTest extends TestCase
{
    public function testCanBeEvaluated(): void
    {
        $constraint = new ObjectHasProperty('theProperty');

        $objectWithProperty              = new stdCla


 that was distributed with this source code.
 */
namespace PHPUnit\Framework\Constraint;

use PHPUnit\Framework\Attributes\CoversClass;
use PHPUnit\Framework\Attributes\DataProvider;
use PHPUnit\Framework\Attributes\Group;
use PHPUnit\Framework\Attributes\Small;
use PHPUnit\Framework\ExpectationFailedException;
use PHPUnit\Framework\TestCase;

#[CoversClass(ArraysAreEqual::class)]
#[CoversClass(Constraint::class)]
#[Small]
#[Group('framework')]
#[Group('framework/constraints')]
final class ArraysAreEqualTes

 matter' => [
                true,
                '',
                [],
                [],
                true,
                true,
            ],
            'identical arrays, keys and order matter' => [
                true,
                '',

t extends TestCase
{
    /**
     * @return array<string, array{bool, string, array<mixed>, mixed, bool, bool}>
     */
    public static function provider(): array
    {
        return [
            'empty arrays, keys and order


tian@phpunit.de>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */
namespace PHPUnit\Framework\Constraint;

use function fclose;
use function fopen;
use PHPUnit\Framework\Attributes\CoversClass;
use PHPUnit\Framework\Attributes\DataProvider;
use PHPUnit\Framework\Attributes\Group;
use PHPUnit\Framework\Attributes\Small;
use PHPUnit\Framework\ExpectationFailedException;
use PHPUnit\Framework\TestCase;
use stdClass;

#[CoversC

    */
    public static function provider(): array
    {
        return [
            [
                true,
                '',
                [0 => 'value', 1 => 'another-value'],
            ],

            [
                false,
                'F

lass(IsList::class)]
#[CoversClass(Constraint::class)]
#[Small]
#[Group('framework')]
#[Group('framework/constraints')]
final class IsListTest extends TestCase
{
    /**
     * @return non-empty-list<array{bool, string, mixed}>


tian@phpunit.de>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */
namespace PHPUnit\Framework\Constraint;

use PHPUnit\Framework\Attributes\CoversClass;
use PHPUnit\Framework\Attributes\DataProvider;
use PHPUnit\Framework\Attributes\Group;
use PHPUnit\Framework\Attributes\Small;
use PHPUnit\Framework\ExpectationFailedException;
use PHPUnit\Framework\TestCase;

#[CoversClass(ExceptionMessageIs::class)]
#[CoversClass(Constrai

c function provider(): array
    {
        return [
            [
                true,
                '',
                'expected-message',
                'expected-message',
            ],

            [
                true,
                '',

nt::class)]
#[Small]
#[Group('framework')]
#[Group('framework/constraints')]
final class ExceptionMessageIsTest extends TestCase
{
    /**
     * @return non-empty-list<array{bool, string, string, mixed}>
     */
    public stati


art of PHPUnit.
 *
 * (c) Sebastian Bergmann <sebastian@phpunit.de>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */
namespace PHPUnit\Framework\Constraint;

use InvalidArgumentException;
use PHPUnit\Framework\Attributes\CoversClass;
use PHPUnit\Framework\Attributes\DataProvider;
use PHPUnit\Framework\Attributes\Group;
use PHPUnit\Framework\Attributes\Small;
use PHPUnit\Framework\ExpectationFailedException;
use PHPUnit\Fram

* @return non-empty-list<array{bool, string, string, mixed}>
     */
    public static function provider(): array
    {
        return [
            [
                true,
                '',
                RuntimeException::class,
                new Ru

ework\TestCase;
use RuntimeException;

#[CoversClass(Exception::class)]
#[CoversClass(Constraint::class)]
#[Small]
#[Group('framework')]
#[Group('framework/constraints')]
final class ExceptionTest extends TestCase
{
    /**


tian@phpunit.de>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */
namespace PHPUnit\Framework\Constraint;

use PHPUnit\Framework\Attributes\CoversClass;
use PHPUnit\Framework\Attributes\DataProvider;
use PHPUnit\Framework\Attributes\Group;
use PHPUnit\Framework\Attributes\Small;
use PHPUnit\Framework\ExpectationFailedException;
use PHPUnit\Framework\TestCase;

#[CoversClass(LogicalAnd::class)]
#[CoversClass(BinaryOperator::

bool, string, string, LogicalAnd, mixed}>
     */
    public static function provider(): array
    {
        return [
            [
                true,
                'is of type bool and is true',
                '',
                self::logicalAnd(

class)]
#[CoversClass(Operator::class)]
#[CoversClass(Constraint::class)]
#[Small]
#[Group('framework')]
#[Group('framework/constraints')]
final class LogicalAndTest extends TestCase
{
    /**
     * @return non-empty-list<array{


tian@phpunit.de>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */
namespace PHPUnit\Framework\Constraint;

use PHPUnit\Framework\Attributes\CoversClass;
use PHPUnit\Framework\Attributes\DataProvider;
use PHPUnit\Framework\Attributes\Group;
use PHPUnit\Framework\Attributes\Small;
use PHPUnit\Framework\ExpectationFailedException;
use PHPUnit\Framework\TestCase;

#[CoversClass(LogicalOr::class)]
#[CoversClass(BinaryOperator::c

ol, string, string, LogicalOr, mixed}>
     */
    public static function provider(): array
    {
        return [
            [
                true,
                'is of type bool or is true',
                '',
                self::logicalOr(

lass)]
#[CoversClass(Operator::class)]
#[CoversClass(Constraint::class)]
#[Small]
#[Group('framework')]
#[Group('framework/constraints')]
final class LogicalOrTest extends TestCase
{
    /**
     * @return non-empty-list<array{bo


tian@phpunit.de>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */
namespace PHPUnit\Framework\Constraint;

use PHPUnit\Framework\Attributes\CoversClass;
use PHPUnit\Framework\Attributes\DataProvider;
use PHPUnit\Framework\Attributes\Group;
use PHPUnit\Framework\Attributes\Small;
use PHPUnit\Framework\ExpectationFailedException;
use PHPUnit\Framework\TestCase;
use SplObjectStorage;
use stdClass;

#[CoversClass(TraversableCon

    /**
     * @return non-empty-list<array{bool, string, mixed, mixed}>
     */
    public static function provider(): array
    {
        $o = new stdClass;

        $s = new SplObjectStorage;
        $s->offsetSet($o);

        return [
            [

tainsIdentical::class)]
#[CoversClass(TraversableContains::class)]
#[CoversClass(Constraint::class)]
#[Small]
#[Group('framework')]
#[Group('framework/constraints')]
final class TraversableContainsIdenticalTest extends TestCase
{


Attributes\Group;
use PHPUnit\Framework\Attributes\Small;
use PHPUnit\Framework\ExpectationFailedException;
use PHPUnit\Framework\TestCase;

#[CoversClass(StringContains::class)]
#[CoversClass(Constraint::class)]
#[Small]
#[Group('framework')]
#[Group('framework/constraints')]
final class StringContainsTest extends TestCase
{
    /**
     * @return array<string, array{bool, string, bool, bool, string, mixed}>
     */
    public static function providesEvaluationCases(): array
    {
        return [

           'Empty needles are supported with default options given' => [
                true,
                '',
                false,
                false,
                '',
                'prefix needle suffix',
            ],

            'It fin

    'It finds the needle with default options given' => [
                true,
                '',
                false,
                false,
                'needle',
                'prefix needle suffix',
            ],


tian@phpunit.de>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */
namespace PHPUnit\Framework\Constraint;

use PHPUnit\Framework\Attributes\CoversClass;
use PHPUnit\Framework\Attributes\DataProvider;
use PHPUnit\Framework\Attributes\Group;
use PHPUnit\Framework\Attributes\Small;
use PHPUnit\Framework\ExpectationFailedException;
use PHPUnit\Framework\TestCase;

#[CoversClass(StringEqualsStringIgnoringWhitespace::class)]
#[Co

ng, string}>
     */
    public static function provider(): array
    {
        return [
            [
                true,
                '',
                'hello world',
                "hello\tworld",
            ],

            [
                tr

versClass(Constraint::class)]
#[Small]
#[Group('framework')]
#[Group('framework/constraints')]
final class StringEqualsStringIgnoringWhitespaceTest extends TestCase
{
    /**
     * @return non-empty-list<array{bool, string, stri


art of PHPUnit.
 *
 * (c) Sebastian Bergmann <sebastian@phpunit.de>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */
namespace PHPUnit\Framework\Constraint;

use function acos;
use function log;
use PHPUnit\Framework\Attributes\CoversClass;
use PHPUnit\Framework\Attributes\Group;
use PHPUnit\Framework\Attributes\Small;
use PHPUnit\Framework\ExpectationFailedException;
use PHPUnit\Framework\TestCase;

#[CoversClass(IsFinite:

w IsFinite;

        $this->assertTrue($constraint->evaluate(1, returnResult: true));
        $this->assertFalse($constraint->evaluate(log(0), returnResult: true));
        $this->assertFalse($constraint->evaluate(acos(2), returnResult: true));
    }

:class)]
#[CoversClass(Constraint::class)]
#[Small]
#[Group('framework')]
#[Group('framework/constraints')]
final class IsFiniteTest extends TestCase
{
    public function testCanBeEvaluated(): void
    {
        $constraint = ne


tian@phpunit.de>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */
namespace PHPUnit\Framework\Constraint;

use ArrayObject;
use PHPUnit\Framework\Attributes\CoversClass;
use PHPUnit\Framework\Attributes\DataProvider;
use PHPUnit\Framework\Attributes\Group;
use PHPUnit\Framework\Attributes\Small;
use PHPUnit\Framework\ExpectationFailedException;
use PHPUnit\Framework\TestCase;

#[CoversClass(ArrayHasKey::class)]
#[CoversClas

c static function provider(): array
    {
        return [
            [
                true,
                '',
                0,
                [0 => 'value'],
            ],

            [
                true,
                '',
                'k

s(Constraint::class)]
#[Small]
#[Group('framework')]
#[Group('framework/constraints')]
final class ArrayHasKeyTest extends TestCase
{
    /**
     * @return non-empty-list<array{bool, string, int|string, mixed}>
     */
    publi


art of PHPUnit.
 *
 * (c) Sebastian Bergmann <sebastian@phpunit.de>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */
namespace PHPUnit\Framework\Constraint;

use PHPUnit\Framework\Attributes\CoversClass;
use PHPUnit\Framework\Attributes\DataProvider;
use PHPUnit\Framework\Attributes\Group;
use PHPUnit\Framework\Attributes\Small;
use PHPUnit\Framework\ExpectationFailedException;
use PHPUnit\Framework\TestCase;

#[CoversClass

empty-list<array{bool, string, string, mixed}>
     */
    public static function provider(): array
    {
        return [
            [
                true,
                '',
                'expected-message',
                'expected-message',

(ExceptionMessageIsOrContains::class)]
#[CoversClass(Constraint::class)]
#[Small]
#[Group('framework')]
#[Group('framework/constraints')]
final class ExceptionMessageIsOrContainsTest extends TestCase
{
    /**
     * @return non-


art of PHPUnit.
 *
 * (c) Sebastian Bergmann <sebastian@phpunit.de>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */
namespace PHPUnit\Framework\Constraint;

use PHPUnit\Framework\Attributes\CoversClass;
use PHPUnit\Framework\Attributes\DataProvider;
use PHPUnit\Framework\Attributes\Group;
use PHPUnit\Framework\Attributes\Small;
use PHPUnit\Framework\Exception;
use PHPUnit\Framework\ExpectationFailedException;
use PHPUnit\F

essionTest extends TestCase
{
    /**
     * @return non-empty-list<array{bool, string, string, mixed}>
     */
    public static function provider(): array
    {
        return [
            [
                true,
                '',
                '/[0

ramework\TestCase;

#[CoversClass(ExceptionMessageMatchesRegularExpression::class)]
#[CoversClass(Constraint::class)]
#[Small]
#[Group('framework')]
#[Group('framework/constraints')]
final class ExceptionMessageMatchesRegularExpr


tian@phpunit.de>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */
namespace PHPUnit\Framework\Constraint;

use DateInterval;
use PHPUnit\Framework\Attributes\CoversClass;
use PHPUnit\Framework\Attributes\DataProvider;
use PHPUnit\Framework\Attributes\Group;
use PHPUnit\Framework\Attributes\Small;
use PHPUnit\Framework\ExpectationFailedException;
use PHPUnit\Framework\TestCase;
use SplObjectStorage;
use stdClass;

#[CoversCl

TestCase
{
    /**
     * @return non-empty-list<array{bool, string, mixed, mixed}>
     */
    public static function provider(): array
    {
        $o = new stdClass;

        $s = new SplObjectStorage;
        $s->offsetSet($o);

        return [

ass(TraversableContainsEqual::class)]
#[CoversClass(TraversableContains::class)]
#[CoversClass(Constraint::class)]
#[Small]
#[Group('framework')]
#[Group('framework/constraints')]
final class TraversableContainsEqualTest extends


tian@phpunit.de>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */
namespace PHPUnit\Framework\Constraint;

use PHPUnit\Framework\Attributes\CoversClass;
use PHPUnit\Framework\Attributes\DataProvider;
use PHPUnit\Framework\Attributes\Group;
use PHPUnit\Framework\Attributes\Small;
use PHPUnit\Framework\EmptyStringException;
use PHPUnit\Framework\ExpectationFailedException;
use PHPUnit\Framework\TestCase;

#[CoversClass(String

ng, string}>
     */
    public static function provider(): array
    {
        return [
            [
                true,
                '',
                'suffix',
                'prefix substring suffix',
            ],

            [

EndsWith::class)]
#[CoversClass(Constraint::class)]
#[Small]
#[Group('framework')]
#[Group('framework/constraints')]
final class StringEndsWithTest extends TestCase
{
    /**
     * @return non-empty-list<array{bool, string, stri


Framework\Attributes\Group;
use PHPUnit\Framework\Attributes\Small;
use PHPUnit\Framework\ComparisonMethodDoesNotAcceptParameterTypeException;
use PHPUnit\Framework\ComparisonMethodDoesNotDeclareBoolReturnTypeException;
use PHPUnit\Framework\ComparisonMethodDoesNotDeclareExactlyOneParameterException;
use PHPUnit\Framework\ComparisonMethodDoesNotDeclareParameterTypeException;
use PHPUnit\Framework\ComparisonMethodDoesNotExistException;
use PHPUnit\Framework\ExpectationFailedException;
use PHPUnit\Framework\T

estCase;
use PHPUnit\TestFixture\ObjectEquals\ValueObject;
use PHPUnit\TestFixture\ObjectEquals\ValueObjectWithEqualsMethodThatAcceptsTooManyArguments;
use PHPUnit\TestFixture\ObjectEquals\ValueObjectWithEqualsMethodThatDoesNotAc


 that was distributed with this source code.
 */
namespace PHPUnit\Framework\Constraint;

use PHPUnit\Framework\Assert;
use PHPUnit\Framework\Attributes\CoversClass;
use PHPUnit\Framework\Attributes\DataProvider;
use PHPUnit\Framework\Attributes\Group;
use PHPUnit\Framework\Attributes\Small;
use PHPUnit\Framework\Attributes\TestDox;
use PHPUnit\Framework\ExpectationFailedException;
use PHPUnit\Framework\TestCase;

#[CoversClass(LogicalNot::class)]
#[CoversClass(UnaryOperator::class)]
#[CoversClass(Operator:

}>
     */
    public static function provider(): array
    {
        return [
            [
                true,
                '',
                self::logicalNot(self::isTrue()),
                false,
            ],

            [
                fa

:class)]
#[CoversClass(Constraint::class)]
#[Small]
#[Group('framework')]
#[Group('framework/constraints')]
final class LogicalNotTest extends TestCase
{
    /**
     * @return non-empty-list<array{bool, string, LogicalNot, mixed


er;
use PHPUnit\Framework\Attributes\Group;
use PHPUnit\Framework\Attributes\Small;
use PHPUnit\Framework\ExpectationFailedException;
use PHPUnit\Framework\TestCase;

#[CoversClass(JsonMatches::class)]
#[CoversClass(Constraint::class)]
#[Small]
#[Group('framework')]
#[Group('framework/constraints')]
final class JsonMatchesTest extends TestCase
{
    /**
     * @return array<string, array{bool, string, string, mixed, mixed}>
     */
    public static function provider(): array
    {
        return [

are unordered' => [
                true,
                '',
                '',
                '{"second":"2", "first":1}',
                '{"first":1, "second":"2"}',
            ],

            'object fields with numeric keys are unordered' => [

    'valid JSON' => [
                true,
                '',
                '',
                json_encode(['Mascott' => 'Tux']),
                json_encode(['Mascott' => 'Tux']),
            ],

            'object fields


art of PHPUnit.
 *
 * (c) Sebastian Bergmann <sebastian@phpunit.de>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */
namespace PHPUnit\Framework\Constraint;

use const INF;
use function acos;
use function log;
use PHPUnit\Framework\Attributes\CoversClass;
use PHPUnit\Framework\Attributes\Group;
use PHPUnit\Framework\Attributes\Small;
use PHPUnit\Framework\ExpectationFailedException;
use PHPUnit\Framework\TestCase;

#[Covers

   $constraint = new IsInfinite;

        $this->assertTrue($constraint->evaluate(log(0), returnResult: true));
        $this->assertFalse($constraint->evaluate(1, returnResult: true));
        $this->assertFalse($constraint->evaluate(acos(2), returnResult

Class(IsInfinite::class)]
#[CoversClass(Constraint::class)]
#[Small]
#[Group('framework')]
#[Group('framework/constraints')]
final class IsInfiniteTest extends TestCase
{
    public function testCanBeEvaluated(): void
    {


tian@phpunit.de>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */
namespace PHPUnit\Framework\Constraint;

use PHPUnit\Framework\Attributes\CoversClass;
use PHPUnit\Framework\Attributes\DataProvider;
use PHPUnit\Framework\Attributes\Group;
use PHPUnit\Framework\Attributes\Small;
use PHPUnit\Framework\ExpectationFailedException;
use PHPUnit\Framework\TestCase;

#[CoversClass(LogicalXor::class)]
#[CoversClass(BinaryOperator::

bool, string, string, LogicalXor, mixed}>
     */
    public static function provider(): array
    {
        return [
            [
                true,
                'is false xor is true',
                '',
                self::logicalXor(

class)]
#[CoversClass(Operator::class)]
#[CoversClass(Constraint::class)]
#[Small]
#[Group('framework')]
#[Group('framework/constraints')]
final class LogicalXorTest extends TestCase
{
    /**
     * @return non-empty-list<array{


 int, mixed}>
     */
    public static function provider(): array
    {
        return [
            [
                true,
                '',
                1234,
                1234,
            ],

            [
                false,

(ExceptionCode::class)]
#[CoversClass(Constraint::class)]
#[Small]
#[Group('framework')]
#[Group('framework/constraints')]
final class ExceptionCodeTest extends TestCase
{
    /**
     * @return non-empty-list<array{bool, string,


declare(strict_types=1);
/*
 * This file is part of PHPUnit.
 *
 * (c) Sebastian Bergmann <sebastian@phpunit.de>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */
namespace PHPUnit\Framework\MockObject;

use PHPUnit\Framework\Attributes\DisableReturnValueGenerationForTestDoubles;
use PHPUnit\Framework\Attributes\Group;
use PHPUnit\Framework\Attributes\Medium;
use PHPUnit\Framework\Attributes\TestDox;
use PHPUnit\Framework\Te

teStubForIntersectionOfInterfaces()')]
#[DisableReturnValueGenerationForTestDoubles]
final class CreateStubForIntersectionOfInterfacesWithDisabledReturnValueGenerationTest extends TestCase
{
    public function testReturnValueGenerationCanBeDisabledWithAtt

stCase;
use PHPUnit\TestFixture\MockObject\AnInterface;
use PHPUnit\TestFixture\MockObject\AnotherInterface;

#[Group('test-doubles')]
#[Group('test-doubles/creation')]
#[Group('test-doubles/test-stub')]
#[Medium]
#[TestDox('crea


art of PHPUnit.
 *
 * (c) Sebastian Bergmann <sebastian@phpunit.de>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */
namespace PHPUnit\Framework\MockObject;

use PHPUnit\Framework\Attributes\Group;
use PHPUnit\Framework\Attributes\Medium;
use PHPUnit\Framework\Attributes\TestDox;
use PHPUnit\Framework\MockObject\Generator\ClassIsAnonymousException;
use PHPUnit\Framework\MockObject\Generator\ClassIsEnumerationException;
use

e\MockObject\Enumeration;
use PHPUnit\TestFixture\MockObject\ExtendableClass;
use PHPUnit\TestFixture\MockObject\ExtendableReadonlyClass;
use PHPUnit\TestFixture\MockObject\FinalClass;

#[Group('test-doubles')]
#[Group('test-doubles/creation')]
#[Group('te

PHPUnit\Framework\MockObject\Generator\ClassIsFinalException;
use PHPUnit\Framework\MockObject\Generator\UnknownTypeException;
use PHPUnit\Framework\TestCase;
use PHPUnit\TestFixture\MockObject\AnInterface;
use PHPUnit\TestFixtur


s=1);
/*
 * This file is part of PHPUnit.
 *
 * (c) Sebastian Bergmann <sebastian@phpunit.de>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */
namespace PHPUnit\TextUI\Configuration;

use PHPUnit\Framework\Attributes\CoversClass;
use PHPUnit\Framework\Attributes\Group;
use PHPUnit\Framework\Attributes\Small;
use PHPUnit\Framework\Attributes\UsesClass;
use PHPUnit\Framework\TestCase;

#[CoversClass(FilterDirectoryCollection:

DirectoryCollectionTest extends TestCase
{
    public function testIsCreatedFromArray(): void
    {
        $element  = $this->element();
        $elements = FilterDirectoryCollection::fromArray([$element]);

        $this->assertSame([$element], $elements

:class)]
#[CoversClass(FilterDirectoryCollectionIterator::class)]
#[UsesClass(FilterDirectory::class)]
#[Small]
#[Group('textui')]
#[Group('textui/configuration')]
#[Group('textui/configuration/value-objects')]
final class Filter


declare(strict_types=1);
/*
 * This file is part of PHPUnit.
 *
 * (c) Sebastian Bergmann <sebastian@phpunit.de>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */
namespace PHPUnit\TextUI\Configuration;

use PHPUnit\Framework\Attributes\CoversClass;
use PHPUnit\Framework\Attributes\Group;
use PHPUnit\Framework\Attributes\Small;
use PHPUnit\Framework\TestCase;

#[CoversClass(FilterDirectory::class)]
#[Small]
#[Group('textui')

($path, new FilterDirectory($path, 'prefix', 'suffix')->path());
    }

    public function testHasPrefix(): void
    {
        $prefix = 'prefix';

        $this->assertSame($prefix, new FilterDirectory('path', $prefix, 'suffix')->prefix());
    }

    pu

]
#[Group('textui/configuration')]
#[Group('textui/configuration/value-objects')]
final class FilterDirectoryTest extends TestCase
{
    public function testHasPath(): void
    {
        $path = 'path';

        $this->assertSame


s=1);
/*
 * This file is part of PHPUnit.
 *
 * (c) Sebastian Bergmann <sebastian@phpunit.de>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */
namespace PHPUnit\TextUI\Configuration;

use PHPUnit\Framework\Attributes\CoversClass;
use PHPUnit\Framework\Attributes\Group;
use PHPUnit\Framework\Attributes\Small;
use PHPUnit\Framework\Attributes\UsesClass;
use PHPUnit\Framework\TestCase;

#[CoversClass(FilterFileCollection::clas

est extends TestCase
{
    public function testIsCreatedFromArray(): void
    {
        $element  = $this->element();
        $elements = FilterFileCollection::fromArray([$element]);

        $this->assertSame([$element], $elements->asArray());
    }

s)]
#[CoversClass(FilterFileCollectionIterator::class)]
#[UsesClass(FilterFile::class)]
#[Small]
#[Group('textui')]
#[Group('textui/configuration')]
#[Group('textui/configuration/value-objects')]
final class FilterFileCollectionT


hp declare(strict_types=1);
/*
 * This file is part of PHPUnit.
 *
 * (c) Sebastian Bergmann <sebastian@phpunit.de>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */
namespace PHPUnit\TextUI\Configuration;

use PHPUnit\Framework\Attributes\CoversClass;
use PHPUnit\Framework\Attributes\Group;
use PHPUnit\Framework\Attributes\Small;
use PHPUnit\Framework\TestCase;

#[CoversClass(FilterFile::class)]
#[Small]
#[Group('textui')]

 new FilterFile($path)->path());
    }

    public function testCanBeIncludedInCodeCoverageAnalysis(): void
    {
        $this->assertTrue(new FilterFile('path')->includeInCodeCoverage());
    }

    public function testCanBeExcludedFromCodeCoverageAnalys

#[Group('textui/configuration')]
#[Group('textui/configuration/value-objects')]
final class FilterFileTest extends TestCase
{
    public function testHasPath(): void
    {
        $path = 'path';

        $this->assertSame($path,


s=1);
/*
 * This file is part of PHPUnit.
 *
 * (c) Sebastian Bergmann <sebastian@phpunit.de>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */
namespace PHPUnit\TextUI\Configuration;

use PHPUnit\Framework\Attributes\CoversClass;
use PHPUnit\Framework\Attributes\Small;
use PHPUnit\Framework\Attributes\UsesClass;
use PHPUnit\Framework\TestCase;

#[CoversClass(GroupCollection::class)]
#[CoversClass(GroupCollectionIterator::cl

]
final class GroupCollectionTest extends TestCase
{
    public function testIsCreatedFromArray(): void
    {
        $element  = $this->element();
        $elements = GroupCollection::fromArray([$element]);

        $this->assertSame([$element], $elements


s=1);
/*
 * This file is part of PHPUnit.
 *
 * (c) Sebastian Bergmann <sebastian@phpunit.de>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */
namespace PHPUnit\TextUI\Configuration;

use PHPUnit\Framework\Attributes\CoversClass;
use PHPUnit\Framework\Attributes\Group;
use PHPUnit\Framework\Attributes\Small;
use PHPUnit\Framework\Attributes\UsesClass;
use PHPUnit\Framework\TestCase;

#[CoversClass(IniSettingCollection::clas

est extends TestCase
{
    public function testIsCreatedFromArray(): void
    {
        $element  = $this->element();
        $elements = IniSettingCollection::fromArray([$element]);

        $this->assertSame([$element], $elements->asArray());
    }

s)]
#[CoversClass(IniSettingCollectionIterator::class)]
#[UsesClass(IniSetting::class)]
#[Small]
#[Group('textui')]
#[Group('textui/configuration')]
#[Group('textui/configuration/value-objects')]
final class IniSettingCollectionT


* This file is part of PHPUnit.
 *
 * (c) Sebastian Bergmann <sebastian@phpunit.de>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */
namespace PHPUnit\TextUI\Configuration;

use PHPUnit\Framework\Attributes\CoversClass;
use PHPUnit\Framework\Attributes\Group;
use PHPUnit\Framework\Attributes\Small;
use PHPUnit\Framework\TestCase;

#[CoversClass(IniSetting::class)]
#[Small]
#[Group('textui')]
#[Group('textui/configuration')]

l class IniSettingTest extends TestCase
{
    public function testHasName(): void
    {
        $this->assertSame('name', new IniSetting('name', 'value')->name());
    }

    public function testHasValue(): void
    {
        $this->assertSame('value', new


tian@phpunit.de>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */
namespace PHPUnit\TextUI\Configuration;

use PHPUnit\Framework\Attributes\CoversClass;
use PHPUnit\Framework\Attributes\Group;
use PHPUnit\Framework\Attributes\Small;
use PHPUnit\Framework\TestCase;

#[CoversClass(Php::class)]
#[Small]
#[Group('textui')]
#[Group('textui/configuration')]
#[Group('textui/configuration/value-objects')]
final class PhpTest extend

bles;
    private readonly VariableCollection $envVariables;
    private readonly VariableCollection $postVariables;
    private readonly VariableCollection $getVariables;
    private readonly VariableCollection $cookieVariables;
    private readonly Varia

s TestCase
{
    private readonly DirectoryCollection $includePaths;
    private readonly IniSettingCollection $iniSettings;
    private readonly ConstantCollection $constants;
    private readonly VariableCollection $globalVaria


figuration')]
#[Group('textui/configuration/value-objects')]
final class SourceTest extends TestCase
{
    public function testHasIncludeDirectories(): void
    {
        $includeDirectories = FilterDirectoryCollection::fromArray([]);

        $source = new Source(
            null,
            false,
            $includeDirectories,
            FilterFileCollection::fromArray([]),
            FilterDirectoryCollection::fromArray([]),
            FilterFileCollection::fromArray([]),
            false,

,
            ],
            false,
            false,
            false,
            true,
        );

        $this->assertSame($includeDirectories, $source->includeDirectories());
    }

    public function testHasIncludeFiles(): void
    {
        $inc

       false,
            false,
            false,
            false,
            false,
            false,
            false,
            false,
            [
                'functions' => [],
                'methods'   => []


s=1);
/*
 * This file is part of PHPUnit.
 *
 * (c) Sebastian Bergmann <sebastian@phpunit.de>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */
namespace PHPUnit\TextUI\Configuration;

use PHPUnit\Framework\Attributes\CoversClass;
use PHPUnit\Framework\Attributes\Group;
use PHPUnit\Framework\Attributes\Small;
use PHPUnit\Framework\Attributes\UsesClass;
use PHPUnit\Framework\TestCase;
use PHPUnit\Util\VersionComparisonOperato

on/value-objects')]
final class TestDirectoryCollectionTest extends TestCase
{
    public function testIsCreatedFromArray(): void
    {
        $element  = $this->element();
        $elements = TestDirectoryCollection::fromArray([$element]);

        $this

r;

#[CoversClass(TestDirectoryCollection::class)]
#[CoversClass(TestDirectoryCollectionIterator::class)]
#[UsesClass(TestDirectory::class)]
#[Small]
#[Group('textui')]
#[Group('textui/configuration')]
#[Group('textui/configurati


s=1);
/*
 * This file is part of PHPUnit.
 *
 * (c) Sebastian Bergmann <sebastian@phpunit.de>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */
namespace PHPUnit\TextUI\Configuration;

use PHPUnit\Framework\Attributes\CoversClass;
use PHPUnit\Framework\Attributes\Group;
use PHPUnit\Framework\Attributes\Small;
use PHPUnit\Framework\TestCase;
use PHPUnit\Util\VersionComparisonOperator;

#[CoversClass(TestDirectory::class)]
#[S

th', $this->fixture()->path());
    }

    public function testHasPrefix(): void
    {
        $this->assertSame('prefix', $this->fixture()->prefix());
    }

    public function testHasSuffix(): void
    {
        $this->assertSame('suffix', $this->fixtur

mall]
#[Group('textui')]
#[Group('textui/configuration')]
#[Group('textui/configuration/value-objects')]
final class TestDirectoryTest extends TestCase
{
    public function testHasPath(): void
    {
        $this->assertSame('pa


s')]
final class TestFileCollectionTest extends TestCase
{
    public function testIsCreatedFromArray(): void
    {
        $element  = $this->element();
        $elements = TestFileCollection::fromArray([$element]);

        $this->assertSame([$element],

r;

#[CoversClass(TestFileCollection::class)]
#[CoversClass(TestFileCollectionIterator::class)]
#[UsesClass(TestFile::class)]
#[Small]
#[Group('textui')]
#[Group('textui/configuration')]
#[Group('textui/configuration/value-object


e(strict_types=1);
/*
 * This file is part of PHPUnit.
 *
 * (c) Sebastian Bergmann <sebastian@phpunit.de>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */
namespace PHPUnit\TextUI\Configuration;

use PHPUnit\Framework\Attributes\CoversClass;
use PHPUnit\Framework\Attributes\Group;
use PHPUnit\Framework\Attributes\Small;
use PHPUnit\Framework\TestCase;
use PHPUnit\Util\VersionComparisonOperator;

#[CoversClass(TestFile::cla

'path', $this->fixture()->path());
    }

    public function testHasPhpVersion(): void
    {
        $this->assertSame('8.2.0', $this->fixture()->phpVersion());
    }

    public function testHasPhpVersionOperator(): void
    {
        $this->assertSame('

ss)]
#[Small]
#[Group('textui')]
#[Group('textui/configuration')]
#[Group('textui/configuration/value-objects')]
final class TestFileTest extends TestCase
{
    public function testHasPath(): void
    {
        $this->assertSame(


s=1);
/*
 * This file is part of PHPUnit.
 *
 * (c) Sebastian Bergmann <sebastian@phpunit.de>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */
namespace PHPUnit\TextUI\Configuration;

use PHPUnit\Framework\Attributes\CoversClass;
use PHPUnit\Framework\Attributes\Group;
use PHPUnit\Framework\Attributes\Small;
use PHPUnit\Framework\Attributes\UsesClass;
use PHPUnit\Framework\TestCase;

#[CoversClass(TestSuiteCollection::class

extends TestCase
{
    public function testIsCreatedFromArray(): void
    {
        $element  = $this->element();
        $elements = TestSuiteCollection::fromArray([$element]);

        $this->assertSame([$element], $elements->asArray());
    }

    publi

)]
#[CoversClass(TestSuiteCollectionIterator::class)]
#[UsesClass(TestSuite::class)]
#[Small]
#[Group('textui')]
#[Group('textui/configuration')]
#[Group('textui/configuration/value-objects')]
final class TestSuiteCollectionTest


s=1);
/*
 * This file is part of PHPUnit.
 *
 * (c) Sebastian Bergmann <sebastian@phpunit.de>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */
namespace PHPUnit\TextUI\Configuration;

use PHPUnit\Framework\Attributes\CoversClass;
use PHPUnit\Framework\Attributes\Group;
use PHPUnit\Framework\Attributes\Small;
use PHPUnit\Framework\TestCase;

#[CoversClass(TestSuite::class)]
#[Small]
#[Group('textui')]
#[Group('textui/configu

ection $files;
    private readonly FileCollection $excludedFiles;
    private readonly TestSuite $fixture;

    protected function setUp(): void
    {
        $this->name          = 'name';
        $this->directories   = TestDirectoryCollection::fromArray

ration')]
#[Group('textui/configuration/value-objects')]
final class TestSuiteTest extends TestCase
{
    private readonly string $name;
    private readonly TestDirectoryCollection $directories;
    private readonly TestFileColl


s=1);
/*
 * This file is part of PHPUnit.
 *
 * (c) Sebastian Bergmann <sebastian@phpunit.de>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */
namespace PHPUnit\TextUI\Configuration;

use PHPUnit\Framework\Attributes\CoversClass;
use PHPUnit\Framework\Attributes\Group;
use PHPUnit\Framework\Attributes\Small;
use PHPUnit\Framework\Attributes\UsesClass;
use PHPUnit\Framework\TestCase;

#[CoversClass(VariableCollection::class)

nds TestCase
{
    public function testIsCreatedFromArray(): void
    {
        $element  = $this->element();
        $elements = VariableCollection::fromArray([$element]);

        $this->assertSame([$element], $elements->asArray());
    }

    public fun

]
#[CoversClass(VariableCollectionIterator::class)]
#[UsesClass(Variable::class)]
#[Small]
#[Group('textui')]
#[Group('textui/configuration')]
#[Group('textui/configuration/value-objects')]
final class VariableCollectionTest exte


hp declare(strict_types=1);
/*
 * This file is part of PHPUnit.
 *
 * (c) Sebastian Bergmann <sebastian@phpunit.de>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */
namespace PHPUnit\TextUI\Configuration;

use PHPUnit\Framework\Attributes\CoversClass;
use PHPUnit\Framework\Attributes\Group;
use PHPUnit\Framework\Attributes\Small;
use PHPUnit\Framework\TestCase;

#[CoversClass(Variable::class)]
#[Small]
#[Group('textui')]
#[

', false)->name());
    }

    public function testHasValue(): void
    {
        $this->assertSame('value', new Variable('name', 'value', false)->value());
    }

    public function testValueCanBeForced(): void
    {
        $this->assertFalse(new Variab

Group('textui/configuration')]
#[Group('textui/configuration/value-objects')]
final class VariableTest extends TestCase
{
    public function testHasName(): void
    {
        $this->assertSame('name', new Variable('name', 'value


declare(strict_types=1);
/*
 * This file is part of PHPUnit.
 *
 * (c) Sebastian Bergmann <sebastian@phpunit.de>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */
namespace PHPUnit\TextUI\Command;

use PHPUnit\Framework\Attributes\CoversClass;
use PHPUnit\Framework\Attributes\Group;
use PHPUnit\Framework\Attributes\Small;
use PHPUnit\Framework\TestCase;

#[CoversClass(AtLeastVersionCommand::class)]
#[Small]
#[Group('textui')

mand->execute();

        $this->assertSame('', $result->output());
        $this->assertSame(0, $result->shellExitCode());
    }

    public function testFailsWhenRequirementIsNotMet(): void
    {
        $command = new AtLeastVersionCommand('100');

]
#[Group('textui/commands')]
final class AtLeastVersionCommandTest extends TestCase
{
    public function testSucceedsWhenRequirementIsMet(): void
    {
        $command = new AtLeastVersionCommand('10');

        $result = $com


tian@phpunit.de>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */
namespace PHPUnit\TextUI\Command;

use const PHP_EOL;
use function realpath;
use PHPUnit\Framework\Attributes\CoversClass;
use PHPUnit\Framework\Attributes\Group;
use PHPUnit\Framework\Attributes\Small;
use PHPUnit\Framework\TestCase;
use PHPUnit\Runner\Phpt\TestCase as PhptTestCase;
use PHPUnit\TestFixture\BankAccountTest;

#[CoversClass(ListTestIdsCommand::

tBalanceIsInitiallyZero');

        $command = new ListTestIdsCommand([$test]);
        $result  = $command->execute();

        $this->assertSame(
            'PHPUnit\TestFixture\BankAccountTest::testBalanceIsInitiallyZero' . PHP_EOL,
            $result

class)]
#[Small]
#[Group('textui')]
#[Group('textui/commands')]
final class ListTestIdsCommandTest extends TestCase
{
    public function testListsTestIdForTestWithoutDataSet(): void
    {
        $test = new BankAccountTest('tes


s=1);
/*
 * This file is part of PHPUnit.
 *
 * (c) Sebastian Bergmann <sebastian@phpunit.de>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */
namespace PHPUnit\TextUI\Command;

use PHPUnit\Framework\Attributes\CoversClass;
use PHPUnit\Framework\Attributes\Group;
use PHPUnit\Framework\Attributes\Small;
use PHPUnit\Framework\TestCase;
use PHPUnit\Runner\Version;

#[CoversClass(ValidateConfigurationCommand::class)]
#[Small]
#

mand(
            __DIR__ . '/../../../../end-to-end/cli/validate-configuration/_files/valid/phpunit.xml',
        );

        $result = $command->execute();

        $this->assertSame(Result::SUCCESS, $result->shellExitCode());
        $this->assertString

[Group('textui')]
#[Group('textui/commands')]
final class ValidateConfigurationCommandTest extends TestCase
{
    public function testSucceedsForValidConfigurationFile(): void
    {
        $command = new ValidateConfigurationCom


tian@phpunit.de>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */
namespace PHPUnit\TextUI\Command;

use const PHP_EOL;
use PHPUnit\Framework\Attributes\CoversClass;
use PHPUnit\Framework\Attributes\DataProvider;
use PHPUnit\Framework\Attributes\Group;
use PHPUnit\Framework\Attributes\Small;
use PHPUnit\Framework\MockObject\Stub;
use PHPUnit\Framework\TestCase;
use PHPUnit\Util\Http\Downloader;

#[CoversClass(VersionCheckCo

3: non-empty-string, 4: non-empty-string, 5: non-empty-string}>
     */
    public static function provider(): array
    {
        return [
            [
                'You are using the latest version of PHPUnit.' . PHP_EOL,
                Result::SUCC

mmand::class)]
#[Small]
#[Group('textui')]
#[Group('textui/commands')]
final class VersionCheckCommandTest extends TestCase
{
    /**
     * @return non-empty-list<array{0: non-empty-string, 1: non-negative-int, 2: positive-int,


s=1);
/*
 * This file is part of PHPUnit.
 *
 * (c) Sebastian Bergmann <sebastian@phpunit.de>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */
namespace PHPUnit\TextUI\Output\Default;

use PHPUnit\Framework\Attributes\CoversClass;
use PHPUnit\Framework\Attributes\DataProvider;
use PHPUnit\Framework\Attributes\Medium;
use PHPUnit\Framework\TestCase;
use PHPUnit\TextUI\CannotOpenSocketException;
use PHPUnit\TextUI\InvalidSock

lic static function providePrinter(): array
    {
        $data = [
            'standard output' => [DefaultPrinter::standardOutput()],
            'standard error'  => [DefaultPrinter::standardError()],
        ];

        try {
            $data['socket

etException;
use PHPUnit\TextUI\Output\DefaultPrinter;

#[CoversClass(DefaultPrinter::class)]
#[Medium]
final class DefaultPrinterTest extends TestCase
{
    /**
     * @return array<string, array{DefaultPrinter}>
     */
    pub


se;
use PHPUnit\Metadata\MetadataCollection;
use PHPUnit\TextUI\Configuration\FilterDirectoryCollection;
use PHPUnit\TextUI\Configuration\FilterFileCollection;
use PHPUnit\TextUI\Configuration\Source;
use PHPUnit\TextUI\Output\Printer;

#[CoversClass(ProgressPrinter::class)]
#[Small]
final class ProgressPrinterTest extends TestCase
{
    public function testPrintsDotForSuccessfulTest(): void
    {
        [$printer, $buffer] = $this->printer();
        $progress           = $this->progressPrinter($printer);

gContainsString('1 / 1 (100%)', $buffer());
    }

    public function testPrintsErrorBeforeTestClassMethodErrored(): void
    {
        [$printer, $buffer] = $this->printer();
        $progress           = $this->progressPrinter($printer);

        $progr

        $progress->testRunnerExecutionStarted($this->executionStarted(1));
        $progress->testPrepared();
        $progress->testFinished();

        $this->assertStringStartsWith('.', $buffer());
        $this->assertStrin


estRunner\ErrorTriggered as TestRunnerIssueErrorTriggered;
use PHPUnit\Event\TestRunner\Issue\DeprecationTriggered as TestRunnerIssueDeprecationTriggered;
use PHPUnit\Event\TestRunner\Issue\NoticeTriggered as TestRunnerIssueNoticeTriggered;
use PHPUnit\Event\TestRunner\Issue\WarningTriggered as TestRunnerIssueWarningTriggered;
use PHPUnit\Event\TestRunner\NoticeTriggered as TestRunnerNoticeTriggered;
use PHPUnit\Event\TestRunner\PhpDeprecationTriggered as TestRunnerIssuePhpDeprecationTriggered;
use PHPUnit\

riggered;
use PHPUnit\Event\TestSuite\Skipped as TestSuiteSkipped;
use PHPUnit\Event\TestSuite\TestSuiteWithName;
use PHPUnit\Framework\Attributes\CoversClass;
use PHPUnit\Framework\Attributes\DataProvider;
use PHPUnit\Framework\Attributes\Medium;
use PHPU

Event\TestRunner\PhpNoticeTriggered as TestRunnerIssuePhpNoticeTriggered;
use PHPUnit\Event\TestRunner\PhpWarningTriggered as TestRunnerIssuePhpWarningTriggered;
use PHPUnit\Event\TestRunner\WarningTriggered as TestRunnerWarningT


art of PHPUnit.
 *
 * (c) Sebastian Bergmann <sebastian@phpunit.de>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */
namespace PHPUnit\TextUI\Output\Default;

use const PHP_OS_FAMILY;
use PHPUnit\Framework\Attributes\CoversClass;
use PHPUnit\Framework\Attributes\DataProviderExternal;
use PHPUnit\Framework\Attributes\Medium;
use PHPUnit\Framework\TestCase;
use PHPUnit\TestRunner\TestResult\TestResult;
use PHPUnit\TextUI\Outp

 public function testPrintsExpectedOutputForTestResultObject(string $expectationFile, TestResult $result): void
    {
        $printer = $this->printer();

        $summaryPrinter = new SummaryPrinter($printer, false);

        $summaryPrinter->print($resu

ut\Printer;
use PHPUnit\TextUI\Output\SummaryPrinter;

#[CoversClass(SummaryPrinter::class)]
#[Medium]
final class SummaryPrinterTest extends TestCase
{
    #[DataProviderExternal(ResultPrinterTest::class, 'provider', false)]


art of PHPUnit.
 *
 * (c) Sebastian Bergmann <sebastian@phpunit.de>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */
namespace PHPUnit\TextUI\Output\Default;

use function hrtime;
use PHPUnit\Event\Facade as EventFacade;
use PHPUnit\Event\Telemetry\CpuTime;
use PHPUnit\Event\Telemetry\Duration;
use PHPUnit\Event\Telemetry\GarbageCollectorStatus;
use PHPUnit\Event\Telemetry\HRTime;
use PHPUnit\Event\Telemetry\Info;
use PHPUn

tCase;
use PHPUnit\TextUI\Output\Printer;

#[CoversClass(UnexpectedOutputPrinter::class)]
#[Small]
final class UnexpectedOutputPrinterTest extends TestCase
{
    public function testForwardsOutputFromEventToPrinter(): void
    {
        $printer = $this->c

it\Event\Telemetry\MemoryUsage;
use PHPUnit\Event\Telemetry\Snapshot;
use PHPUnit\Event\Test\PrintedUnexpectedOutput;
use PHPUnit\Framework\Attributes\CoversClass;
use PHPUnit\Framework\Attributes\Small;
use PHPUnit\Framework\Tes


ethod;
use PHPUnit\Event\Code\TestDoxBuilder;
use PHPUnit\Event\Code\TestMethod;
use PHPUnit\Event\Code\ThrowableBuilder;
use PHPUnit\Event\Facade as EventFacade;
use PHPUnit\Event\Telemetry\CpuTime;
use PHPUnit\Event\Telemetry\Duration;
use PHPUnit\Event\Telemetry\GarbageCollectorStatus;
use PHPUnit\Event\Telemetry\HRTime;
use PHPUnit\Event\Telemetry\Info;
use PHPUnit\Event\Telemetry\MemoryUsage;
use PHPUnit\Event\Telemetry\Snapshot;
use PHPUnit\Event\Test\AfterLastTestMethodErrored;
use PHPUnit\Event\Test

omDataProvider;
use PHPUnit\Event\TestData\TestDataCollection;
use PHPUnit\Framework\Attributes\CoversClass;
use PHPUnit\Framework\Attributes\DataProvider;
use PHPUnit\Framework\Attributes\Medium;
use PHPUnit\Framework\ExpectationFailedException;
use PHPUn

\AfterLastTestMethodFailed;
use PHPUnit\Event\Test\BeforeFirstTestMethodErrored;
use PHPUnit\Event\Test\BeforeFirstTestMethodFailed;
use PHPUnit\Event\Test\Errored;
use PHPUnit\Event\Test\Failed;
use PHPUnit\Event\TestData\DataFr


stRunner\Issue\DeprecationTriggered as TestRunnerIssueDeprecationTriggered;
use PHPUnit\Event\TestRunner\Issue\NoticeTriggered as TestRunnerIssueNoticeTriggered;
use PHPUnit\Event\TestRunner\Issue\WarningTriggered as TestRunnerIssueWarningTriggered;
use PHPUnit\Event\TestRunner\NoticeTriggered as TestRunnerNoticeTriggered;
use PHPUnit\Event\TestRunner\PhpDeprecationTriggered as TestRunnerIssuePhpDeprecationTriggered;
use PHPUnit\Event\TestRunner\PhpNoticeTriggered as TestRunnerIssuePhpNoticeTriggered;
use P

ttributes\DataProvider;
use PHPUnit\Framework\Attributes\Medium;
use PHPUnit\Framework\ExpectationFailedException;
use PHPUnit\Framework\IncompleteTestError;
use PHPUnit\Framework\TestCase;
use PHPUnit\Metadata\MetadataCollection;
use PHPUnit\TestRunner\Te

HPUnit\Event\TestRunner\PhpWarningTriggered as TestRunnerIssuePhpWarningTriggered;
use PHPUnit\Event\TestRunner\WarningTriggered as TestRunnerWarningTriggered;
use PHPUnit\Framework\Attributes\CoversClass;
use PHPUnit\Framework\A


art of PHPUnit.
 *
 * (c) Sebastian Bergmann <sebastian@phpunit.de>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */
namespace PHPUnit\Event;

use function hrtime;
use PHPUnit\Event\Code\TestCollection;
use PHPUnit\Event\Code\TestDoxBuilder;
use PHPUnit\Event\Telemetry\CpuTime;
use PHPUnit\Event\Telemetry\Duration;
use PHPUnit\Event\Telemetry\HRTime;
use PHPUnit\Event\TestData\TestDataCollection;
use PHPUnit\Event\TestSuite

rn new Telemetry\Info(
            new Telemetry\Snapshot(
                HRTime::fromSecondsAndNanoseconds(...hrtime(false)),
                Telemetry\MemoryUsage::fromBytes(1000),
                Telemetry\MemoryUsage::fromBytes(2000),

\TestSuiteWithName;
use PHPUnit\Framework\TestCase;
use PHPUnit\Metadata\MetadataCollection;

abstract class AbstractEventTestCase extends TestCase
{
    final protected function telemetryInfo(): Telemetry\Info
    {
        retu


s=1);
/*
 * This file is part of PHPUnit.
 *
 * (c) Sebastian Bergmann <sebastian@phpunit.de>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */
namespace PHPUnit\Event;

use PHPUnit\Framework\Attributes\CoversClass;
use PHPUnit\Framework\Attributes\Group;
use PHPUnit\Framework\Attributes\Small;
use PHPUnit\Framework\TestCase;

#[CoversClass(EventCollection::class)]
#[CoversClass(EventCollectionIterator::class)]
#[Small]
#[Gr

ents);
        $this->assertTrue($events->isEmpty());
        $this->assertFalse($events->isNotEmpty());
        $this->assertSame([], $events->asArray());
    }

    public function testCollectsEventObjects(): void
    {
        $event  = $this->createStu

oup('event-system')]
#[Group('event-system/events')]
final class EventCollectionTest extends TestCase
{
    public function testIsInitiallyEmpty(): void
    {
        $events = new EventCollection;

        $this->assertEmpty($ev


e(strict_types=1);
/*
 * This file is part of PHPUnit.
 *
 * (c) Sebastian Bergmann <sebastian@phpunit.de>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */
namespace PHPUnit\Event;

use PHPUnit\Event\Tracer\Tracer;
use PHPUnit\Framework\Attributes\CoversClass;
use PHPUnit\Framework\Attributes\Group;
use PHPUnit\Framework\Attributes\Small;
use PHPUnit\Framework\TestCase;

#[CoversClass(Facade::class)]
#[Small]
#[Group('event

ade::instance()->registerSubscriber(
            new class implements Subscriber
            {},
        );
    }

    public function testTracerRegistrationDoesNotWorkWhenEventFacadeIsSealed(): void
    {
        $this->expectException(EventFacadeIsSealed

-system')]
final class FacadeTest extends TestCase
{
    public function testSubscriberRegistrationDoesNotWorkWhenEventFacadeIsSealed(): void
    {
        $this->expectException(EventFacadeIsSealedException::class);

        Fac


tian@phpunit.de>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */
namespace PHPUnit\Framework\MockObject;

use PHPUnit\Framework\Attributes\Group;
use PHPUnit\Framework\Attributes\Medium;
use PHPUnit\Framework\Attributes\TestDox;
use PHPUnit\Framework\MockObject\Generator\RuntimeException as GeneratorRuntimeException;
use PHPUnit\Framework\MockObject\Generator\UnknownInterfaceException;
use PHPUnit\Framework\TestCase;
use P

est-doubles')]
#[Group('test-doubles/creation')]
#[Group('test-doubles/test-stub')]
#[Medium]
#[TestDox('createStubForIntersectionOfInterfaces()')]
final class CreateStubForIntersectionOfInterfacesTest extends TestCase
{
    public function testCreatesTest

HPUnit\TestFixture\MockObject\AnInterface;
use PHPUnit\TestFixture\MockObject\AnotherInterface;
use PHPUnit\TestFixture\MockObject\AnotherInterfaceThatDoesSomething;
use PHPUnit\TestFixture\MockObject\ExtendableClass;

#[Group('t


tian@phpunit.de>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */
namespace PHPUnit\Framework\MockObject;

use function md5;
use function mt_rand;
use PHPUnit\Framework\Attributes\CoversClass;
use PHPUnit\Framework\Attributes\CoversMethod;
use PHPUnit\Framework\Attributes\Group;
use PHPUnit\Framework\Attributes\Medium;
use PHPUnit\Framework\Attributes\TestDox;
use PHPUnit\Framework\MockObject\Generator\DuplicateMethodExcept

ramework\TestCase;
use PHPUnit\TestFixture\MockObject\ExtendableClass;
use PHPUnit\TestFixture\MockObject\ExtendableClassCallingMethodInConstructor;
use PHPUnit\TestFixture\MockObject\ExtendableClassWithConstructorArguments;
use PHPUnit\TestFixture\MockObj

ion;
use PHPUnit\Framework\MockObject\Generator\InvalidClassNameException;
use PHPUnit\Framework\MockObject\Generator\InvalidMethodNameException;
use PHPUnit\Framework\MockObject\Generator\NameAlreadyInUseException;
use PHPUnit\F


s=1);
/*
 * This file is part of PHPUnit.
 *
 * (c) Sebastian Bergmann <sebastian@phpunit.de>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */
namespace PHPUnit\Framework\MockObject;

use PHPUnit\Framework\Attributes\CoversClass;
use PHPUnit\Framework\Attributes\Group;
use PHPUnit\Framework\Attributes\Small;
use PHPUnit\Framework\TestCase;

#[CoversClass(MethodNameConstraint::class)]
#[Group('test-doubles')]
#[Small]
final

 public function testCanBeRepresentedAsString(): void
    {
        $constraint = new MethodNameConstraint('foo');

        $this->assertSame('is "foo"', $constraint->toString());
    }

    public function testMatchesMatchingMethodNameCaseInsensitively():

class MethodNameConstraintTest extends TestCase
{
    public function testHasMethodName(): void
    {
        $constraint = new MethodNameConstraint('foo');

        $this->assertSame('foo', $constraint->methodName());
    }


hp declare(strict_types=1);
/*
 * This file is part of PHPUnit.
 *
 * (c) Sebastian Bergmann <sebastian@phpunit.de>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */
namespace PHPUnit\Framework\MockObject\Runtime;

use PHPUnit\Framework\Attributes\CoversClass;
use PHPUnit\Framework\Attributes\Group;
use PHPUnit\Framework\Attributes\Small;
use PHPUnit\Framework\TestCase;

#[CoversClass(PropertyHook::class)]
#[CoversClass(Prop

Hook::set($propertyName);

        $this->assertSame($propertyName, $propertyHook->propertyName());
    }

    public function testCanBeRepresentedAsString(): void
    {
        $propertyName = 'property';

        $propertyHook = PropertyHook::set($proper

ertySetHook::class)]
#[Small]
#[Group('test-doubles')]
final class PropertySetHookTest extends TestCase
{
    public function testHasPropertyName(): void
    {
        $propertyName = 'property';

        $propertyHook = Property


art of PHPUnit.
 *
 * (c) Sebastian Bergmann <sebastian@phpunit.de>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */
namespace PHPUnit\Framework\MockObject\Rule;

use PHPUnit\Framework\Attributes\CoversClass;
use PHPUnit\Framework\Attributes\Group;
use PHPUnit\Framework\Attributes\IgnorePhpunitDeprecations;
use PHPUnit\Framework\Attributes\Small;
use PHPUnit\Framework\Constraint\IsEqual;
use PHPUnit\Framework\ExpectationFai

all]
final class ParametersTest extends TestCase
{
    public function testVerifyWithoutApplyThrowsException(): void
    {
        $rule = new Parameters([new IsEqual(1)]);

        $this->expectException(ExpectationFailedException::class);
        $this->

ledException;
use PHPUnit\Framework\TestCase;
use PHPUnit\TestFixture\MockObject\AnInterface;
use PHPUnit\TestFixture\MockObject\InterfaceWithReturnTypeDeclaration;

#[CoversClass(Parameters::class)]
#[Group('test-doubles')]
#[Sm


tian@phpunit.de>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */
namespace PHPUnit\TextUI\Configuration;

use const BAR;
use const FOO;
use const PATH_SEPARATOR;
use const PHP_EOL;
use function getenv;
use function ini_get;
use function ini_set;
use function putenv;
use PHPUnit\Framework\Attributes\BackupGlobals;
use PHPUnit\Framework\Attributes\CoversClass;
use PHPUnit\Framework\Attributes\Group;
use PHPUnit\Framework\Att

ase
{
    #[BackupGlobals(true)]
    public function testPHPConfigurationIsHandledCorrectly(): void
    {
        $savedIniHighlightKeyword = ini_get('highlight.keyword');

        $this->handle();

        $path = TEST_FILES_PATH . '.' . PATH_SEPARATOR .

ributes\Medium;
use PHPUnit\Framework\TestCase;
use PHPUnit\TextUI\XmlConfiguration\Loader;

#[CoversClass(PhpHandler::class)]
#[Medium]
#[Group('textui')]
#[Group('textui/configuration')]
final class PhpHandlerTest extends TestC


=> true,
            ],
            self::createSource(
                includeFiles: FilterFileCollection::fromArray([
                    new FilterFile(self::fixturePath('a/PrefixSuffix.php')),
                ]),
            ),
        ];

        yield 'file included using file, but excluded using directory' => [
            [
            ],
            self::createSource(
                excludeDirectories: FilterDirectoryCollection::fromArray(
                    [
                        new FilterD

 FilterFileCollection::fromArray(
                    [
                        new FilterFile(self::fixturePath('/a/PrefixSuffix.php')),
                    ],
                ),
            ),
        ];

        yield 'file included using file, but excl

irectory(
                            self::fixturePath('/a'),
                            '',
                            '.php',
                        ),
                    ],
                ),
                includeFiles:


i')]
#[Group('textui/configuration')]
final class ConfigurationTest extends TestCase
{
    public function testTestFilesFileThrowsWhenNotConfigured(): void
    {
        $configuration = $this->defaultConfiguration();

        $this->assertFalse($configuration->hasTestFilesFile());

        $this->expectException(NoTestFilesFileException::class);

        $configuration->testFilesFile();
    }

    public function testConfigurationFileThrowsWhenNotLoadedFromFile(): void
    {
        $configuration = $this-

unction testBootstrapThrowsWhenNotConfigured(): void
    {
        $configuration = $this->defaultConfiguration();

        $this->assertFalse($configuration->hasBootstrap());

        $this->expectException(NoBootstrapException::class);

        $configur

>defaultConfiguration();

        $this->assertFalse($configuration->hasConfigurationFile());

        $this->expectException(NoConfigurationFileException::class);

        $configuration->configurationFile();
    }

    public f


s=1);
/*
 * This file is part of PHPUnit.
 *
 * (c) Sebastian Bergmann <sebastian@phpunit.de>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */
namespace PHPUnit\TextUI\XmlConfiguration;

use PHPUnit\Framework\Attributes\CoversClass;
use PHPUnit\Framework\Attributes\Group;
use PHPUnit\Framework\Attributes\Small;
use PHPUnit\Framework\TestCase;

#[CoversClass(Generator::class)]
#[Small]
#[Group('textui')]
#[Group('textui/conf

(
            '<?xml version="1.0" encoding="UTF-8"?>
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/X.Y/phpunit.xsd"
         bootstrap="vendor/autoload.php"
         cacheD

iguration')]
#[Group('textui/configuration/xml')]
final class GeneratorTest extends TestCase
{
    public function testGeneratesConfigurationCorrectly(): void
    {
        $generator = new Generator;

        $this->assertEquals


tian@phpunit.de>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */
namespace PHPUnit\TextUI\XmlConfiguration;

use PHPUnit\Framework\Attributes\DataProvider;
use PHPUnit\Framework\Attributes\Group;
use PHPUnit\Framework\TestCase;
use PHPUnit\Util\Xml\Loader as XmlLoader;

#[Group('textui')]
#[Group('textui/configuration')]
#[Group('textui/configuration/xml')]
final class MigratorTest extends TestCase
{
    /**
     * @return

xml',
                __DIR__ . '/../../../../_files/XmlConfigurationMigration/input-9.2.xml',
            ],
            'PHPUnit 9.5' => [
                __DIR__ . '/../../../../_files/XmlConfigurationMigration/output-9.5.xml',
                __DIR__ .

 array<string, array{string, string}>
     */
    public static function provider(): array
    {
        return [
            'PHPUnit 9.2' => [
                __DIR__ . '/../../../../_files/XmlConfigurationMigration/output-9.2.


ew Builder)->fromParameters([]);

        $this->assertFalse($configuration->hasAll());

        $this->expectException(Exception::class);

        $configuration->all();
    }

    #[TestDox('--colors')]
    public function testColorsImplicitAuto(): void
    {
        $configuration = (new Builder)->fromParameters(['--colors']);

        $this->assertTrue($configuration->hasColors());
        $this->assertSame('auto', $configuration->colors());
    }

    #[TestDox('--colors=auto')]
    public function tes

  }

    #[TestDox('--colors=always')]
    public function testColorsAlways(): void
    {
        $configuration = (new Builder)->fromParameters(['--colors=always']);

        $this->assertTrue($configuration->hasColors());
        $this->assertSame('alway

tColorsExplicitAuto(): void
    {
        $configuration = (new Builder)->fromParameters(['--colors=auto']);

        $this->assertTrue($configuration->hasColors());
        $this->assertSame('auto', $configuration->colors());


s=1);
/*
 * This file is part of PHPUnit.
 *
 * (c) Sebastian Bergmann <sebastian@phpunit.de>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */
namespace PHPUnit\TextUI\Configuration;

use PHPUnit\Framework\Attributes\CoversClass;
use PHPUnit\Framework\Attributes\Group;
use PHPUnit\Framework\Attributes\Small;
use PHPUnit\Framework\Attributes\UsesClass;
use PHPUnit\Framework\TestCase;

#[CoversClass(ConstantCollection::class)

nds TestCase
{
    public function testIsCreatedFromArray(): void
    {
        $element  = $this->element();
        $elements = ConstantCollection::fromArray([$element]);

        $this->assertSame([$element], $elements->asArray());
    }

    public fun

]
#[CoversClass(ConstantCollectionIterator::class)]
#[UsesClass(Constant::class)]
#[Small]
#[Group('textui')]
#[Group('textui/configuration')]
#[Group('textui/configuration/value-objects')]
final class ConstantCollectionTest exte


 * (c) Sebastian Bergmann <sebastian@phpunit.de>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */
namespace PHPUnit\TextUI\Configuration;

use PHPUnit\Framework\Attributes\CoversClass;
use PHPUnit\Framework\Attributes\Group;
use PHPUnit\Framework\Attributes\Small;
use PHPUnit\Framework\TestCase;

#[CoversClass(Constant::class)]
#[Small]
#[Group('textui')]
#[Group('textui/configuration')]
#[Group('textui/configuration/value-

{
    public function testHasName(): void
    {
        $this->assertSame('name', new Constant('name', 'value')->name());
    }

    public function testHasValue(): void
    {
        $this->assertSame('value', new Constant('name', 'value')->value());

objects')]
final class ConstantTest extends TestCase


<?php declare(strict_types=1);
/*
 * This file is part of PHPUnit.
 *
 * (c) Sebastian Bergmann <sebastian@phpunit.de>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */
namespace PHPUnit\TextUI\Configuration;

use PHPUnit\Framework\Attributes\CoversClass;
use PHPUnit\Framework\Attributes\Group;
use PHPUnit\Framework\Attributes\Small;
use PHPUnit\Framework\TestCase;

#[CoversClass(Directory::class)]
#[Small]
#[Group('textui')

tui/configuration')]
#[Group('textui/configuration/value-objects')]
final class DirectoryTest extends TestCase
{
    public function testHasPath(): void
    {
        $path = 'path';

        $this->assertSame($path, new Directory($path)->path());
    }
}


s=1);
/*
 * This file is part of PHPUnit.
 *
 * (c) Sebastian Bergmann <sebastian@phpunit.de>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */
namespace PHPUnit\TextUI\Configuration;

use PHPUnit\Framework\Attributes\CoversClass;
use PHPUnit\Framework\Attributes\Group;
use PHPUnit\Framework\Attributes\Small;
use PHPUnit\Framework\Attributes\UsesClass;
use PHPUnit\Framework\TestCase;

#[CoversClass(FileCollection::class)]
#[

   public function testIsCreatedFromArray(): void
    {
        $element  = $this->element();
        $elements = FileCollection::fromArray([$element]);

        $this->assertSame([$element], $elements->asArray());
    }

    public function testIsCountabl

CoversClass(FileCollectionIterator::class)]
#[UsesClass(File::class)]
#[Small]
#[Group('textui')]
#[Group('textui/configuration')]
#[Group('textui/configuration/value-objects')]
final class FileCollectionTest extends TestCase
{


hp declare(strict_types=1);
/*
 * This file is part of PHPUnit.
 *
 * (c) Sebastian Bergmann <sebastian@phpunit.de>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */
namespace PHPUnit\Framework\MockObject;

use PHPUnit\Framework\Attributes\DisableReturnValueGenerationForTestDoubles;
use PHPUnit\Framework\Attributes\Group;
use PHPUnit\Framework\Attributes\Medium;
use PHPUnit\Framework\Attributes\TestDox;
use PHPUnit\Framework

oubles]
final class CreateStubWithDisabledReturnValueGenerationTest extends TestCase
{
    public function testReturnValueGenerationCanBeDisabledWithAttribute(): void
    {
        $double = $this->createStub(AnInterface::class);

        $this->expectExce

\TestCase;
use PHPUnit\TestFixture\MockObject\AnInterface;

#[Group('test-doubles')]
#[Group('test-doubles/creation')]
#[Group('test-doubles/test-stub')]
#[Medium]
#[TestDox('createStub()')]
#[DisableReturnValueGenerationForTestD


 that was distributed with this source code.
 */
namespace PHPUnit\Framework\MockObject;

use PHPUnit\Framework\Attributes\CoversClass;
use PHPUnit\Framework\Attributes\Group;
use PHPUnit\Framework\Attributes\Small;
use PHPUnit\Framework\MockObject\Rule\AnyInvokedCount;
use PHPUnit\Framework\MockObject\Rule\MethodName;
use PHPUnit\Framework\MockObject\Rule\Parameters;
use PHPUnit\Framework\TestCase;
use PHPUnit\TestFixture\MockObject\AnInterface;
use ReflectionProperty;

#[CoversClass(InvocationHandler::cla

lse, false);

        $handler->seal(false);

        $this->assertTrue($handler->isSealed());

        $handler->seal(false);

        $this->assertTrue($handler->isSealed());
    }

    public function testSealingStubDoesNotAddMatchersForUnconfiguredMeth

ss)]
#[Group('test-doubles')]
#[Small]
final class InvocationHandlerTest extends TestCase
{
    public function testSealingAlreadySealedHandlerReturnsEarly(): void
    {
        $handler = new InvocationHandler([], 'stdClass', fa


Hook::get($propertyName);

        $this->assertSame($propertyName, $propertyHook->propertyName());
    }

    public function testCanBeRepresentedAsString(): void
    {
        $propertyName = 'property';

        $propertyHook = PropertyHook::get($proper

ertyGetHook::class)]
#[Small]
#[Group('test-doubles')]
final class PropertyGetHookTest extends TestCase
{
    public function testHasPropertyName(): void
    {
        $propertyName = 'property';

        $propertyHook = Property


 function provider(): array
    {
        return [
            'file included using file' => [
                [
                    self::fixturePath('a/PrefixSuffix.php') => true,
                ],
                self::createSource(includeFiles: FilterFileCollection::fromArray(
                    [
                        new FilterFile(self::fixturePath('/a/PrefixSuffix.php')),
                    ],
                )),
            ],
            'file included using file, but excluded using directory

             new FilterFile(self::fixturePath('/a/PrefixSuffix.php')),
                    ]),
                    excludeDirectories: FilterDirectoryCollection::fromArray(
                        [
                            new FilterDirectory(

' => [
                [
                    self::fixturePath('a/PrefixSuffix.php') => false,
                ],
                self::createSource(
                    includeFiles: FilterFileCollection::fromArray([


TestSuiteSorter;
use PHPUnit\TextUI\Configuration\Configuration;
use SebastianBergmann\CodeCoverage\Report\Html\Colors;
use SebastianBergmann\CodeCoverage\Report\Thresholds;

#[CoversNamespace('PHPUnit\TextUI\XmlConfiguration')]
#[Medium]
#[Group('textui')]
#[Group('textui/configuration')]
#[Group('textui/configuration/xml')]
final class LoaderTest extends TestCase
{
    /**
     * @return array<string, array{string, string, bool|int|string}>
     */
    public static function configurationRootOptionsProvid

, TestSuiteSorter::ORDER_RANDOMIZED],
            'executionOrder reverse'             => ['executionOrder', 'reverse', TestSuiteSorter::ORDER_REVERSED],
            'executionOrder duration-ascending'  => ['executionOrder', 'duration-ascending', TestSuite

er(): array
    {
        return [
            'executionOrder default'             => ['executionOrder', 'default', TestSuiteSorter::ORDER_DEFAULT],
            'executionOrder random'              => ['executionOrder', 'random'


s=1);
/*
 * This file is part of PHPUnit.
 *
 * (c) Sebastian Bergmann <sebastian@phpunit.de>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */
namespace PHPUnit\TextUI\XmlConfiguration;

use function file_get_contents;
use PHPUnit\Framework\Attributes\CoversClass;
use PHPUnit\Framework\Attributes\Group;
use PHPUnit\Framework\Attributes\Small;
use PHPUnit\Framework\TestCase;
use PHPUnit\Runner\Version;
use PHPUnit\Util\Xml\L

ublic function testValidatesValidXmlFile(): void
    {
        $result = (new Validator)->validate(
            (new Loader)->loadFile(__DIR__ . '/../../../../../phpunit.xml'),
            (new SchemaFinder)->find(Version::series()),
        );

        $t

oader;

#[CoversClass(Validator::class)]
#[CoversClass(ValidationResult::class)]
#[Small]
#[Group('textui')]
#[Group('textui/configuration')]
#[Group('textui/configuration/xml')]
final class ValidatorTest extends TestCase
{
    p


s=1);
/*
 * This file is part of PHPUnit.
 *
 * (c) Sebastian Bergmann <sebastian@phpunit.de>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */
namespace PHPUnit\TextUI\Configuration;

use PHPUnit\Framework\Attributes\CoversClass;
use PHPUnit\Framework\Attributes\Group;
use PHPUnit\Framework\Attributes\Small;
use PHPUnit\Framework\Attributes\UsesClass;
use PHPUnit\Framework\TestCase;

#[CoversClass(DirectoryCollection::class

extends TestCase
{
    public function testIsCreatedFromArray(): void
    {
        $element  = $this->element();
        $elements = DirectoryCollection::fromArray([$element]);

        $this->assertSame([$element], $elements->asArray());
    }

    publi

)]
#[CoversClass(DirectoryCollectionIterator::class)]
#[UsesClass(Directory::class)]
#[Small]
#[Group('textui')]
#[Group('textui/configuration')]
#[Group('textui/configuration/value-objects')]
final class DirectoryCollectionTest


?php declare(strict_types=1);
/*
 * This file is part of PHPUnit.
 *
 * (c) Sebastian Bergmann <sebastian@phpunit.de>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */
namespace PHPUnit\TextUI\Configuration;

use PHPUnit\Framework\Attributes\CoversClass;
use PHPUnit\Framework\Attributes\Group;
use PHPUnit\Framework\Attributes\Small;
use PHPUnit\Framework\TestCase;

#[CoversClass(ExtensionBootstrap::class)]
#[Small]
#[Group('

        $this->assertSame($className, new ExtensionBootstrap($className, [])->className());
    }

    public function testHasParameters(): void
    {
        $parameters = ['foo' => 'bar'];

        $this->assertSame($parameters, new ExtensionBootstrap('

textui')]
#[Group('textui/configuration')]
#[Group('textui/configuration/value-objects')]
final class ExtensionBootstrapTest extends TestCase
{
    public function testHasClassName(): void
    {
        $className = 'ClassName';


tian@phpunit.de>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */
namespace PHPUnit\Framework\MockObject;

use function md5;
use function mt_rand;
use PHPUnit\Framework\Attributes\CoversClass;
use PHPUnit\Framework\Attributes\CoversMethod;
use PHPUnit\Framework\Attributes\Group;
use PHPUnit\Framework\Attributes\Medium;
use PHPUnit\Framework\Attributes\TestDox;
use PHPUnit\Framework\MockObject\Generator\NameAlreadyInUseExcep

ration;

#[CoversClass(TestStubBuilder::class)]
#[CoversMethod(TestCase::class, 'getStubBuilder')]
#[Group('test-doubles')]
#[Group('test-doubles/creation')]
#[Group('test-doubles/test-stub')]
#[TestDox('TestStubBuilder')]
#[Medium]
final class TestStubBui

tion;
use PHPUnit\Framework\TestCase;
use PHPUnit\TestFixture\MockObject\ExtendableClass;
use PHPUnit\TestFixture\MockObject\ExtendableClassWithConstructorArguments;
use PHPUnit\TestFixture\MockObject\InterfaceWithReturnTypeDecla


s=1);
/*
 * This file is part of PHPUnit.
 *
 * (c) Sebastian Bergmann <sebastian@phpunit.de>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */
namespace PHPUnit\TextUI\Configuration;

use const DIRECTORY_SEPARATOR;
use function ltrim;
use function realpath;
use function str_replace;
use PHPUnit\Framework\TestCase;

abstract class AbstractSourceFilterTestCase extends TestCase
{
    protected static function createSource(

  ): Source {
        return new Source(
            null,
            false,
            $includeDirectories ?? FilterDirectoryCollection::fromArray([]),
            $includeFiles ?? FilterFileCollection::fromArray([]),
            $excludeDirectories ??

     ?FilterDirectoryCollection $includeDirectories = null,
        ?FilterDirectoryCollection $excludeDirectories = null,
        ?FilterFileCollection $includeFiles = null,
        ?FilterFileCollection $excludeFiles = null,


e(strict_types=1);
/*
 * This file is part of PHPUnit.
 *
 * (c) Sebastian Bergmann <sebastian@phpunit.de>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */
namespace PHPUnit\TextUI\XmlConfiguration;

use function count;
use PHPUnit\Framework\Attributes\CoversClass;
use PHPUnit\Framework\Attributes\Group;
use PHPUnit\Framework\Attributes\Small;
use PHPUnit\Framework\TestCase;
use PHPUnit\Runner\Version;

#[CoversClass(Schema

 $schemas = (new SchemaFinder)->available();

        $this->assertSame((new Version)->series(), $schemas[0]);
        $this->assertSame('8.5', $schemas[count($schemas) - 1]);
    }

    public function testFindsExistingSchema(): void
    {
        $this->

Finder::class)]
#[Small]
#[Group('textui')]
#[Group('textui/configuration')]
#[Group('textui/configuration/xml')]
final class SchemaFinderTest extends TestCase
{
    public function testListsAvailableSchemas(): void
    {


e(strict_types=1);
/*
 * This file is part of PHPUnit.
 *
 * (c) Sebastian Bergmann <sebastian@phpunit.de>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */
namespace PHPUnit\TextUI\Configuration;

use PHPUnit\Framework\Attributes\CoversClass;
use PHPUnit\Framework\Attributes\Group;
use PHPUnit\Framework\Attributes\Small;
use PHPUnit\Framework\Attributes\UsesClass;
use PHPUnit\Framework\TestCase;

#[CoversClass(ExtensionBoot

')]
final class ExtensionBootstrapCollectionTest extends TestCase
{
    public function testIsCreatedFromArray(): void
    {
        $element  = $this->element();
        $elements = ExtensionBootstrapCollection::fromArray([$element]);

        $this->asse

strapCollection::class)]
#[CoversClass(ExtensionBootstrapCollectionIterator::class)]
#[UsesClass(ExtensionBootstrap::class)]
#[Small]
#[Group('textui')]
#[Group('textui/configuration')]
#[Group('textui/configuration/value-objects


 that was distributed with this source code.
 */
namespace PHPUnit\TextUI\XmlConfiguration;

use function uniqid;
use PHPUnit\Framework\Attributes\CoversClass;
use PHPUnit\Framework\Attributes\Group;
use PHPUnit\Framework\Attributes\Medium;
use PHPUnit\Framework\TestCase;
use PHPUnit\TextUI\CliArguments\Builder;
use PHPUnit\TextUI\Configuration\Merger;

#[CoversClass(Merger::class)]
#[Medium]
#[Group('textui')]
#[Group('textui/configuration')]
final class MergerTest extends TestCase
{
    public function te

ing()->hasTeamCity());
        $this->assertTrue($fromFile->logging()->hasTestDoxHtml());
        $this->assertTrue($fromFile->logging()->hasTestDoxText());

        $this->assertTrue($fromFile->logging()->hasJunit());
        $this->assertNotSame($junitLo

stNoLoggingShouldOnlyAffectXmlConfiguration(): void
    {
        $junitLog = uniqid('junit_log_');
        $fromFile = (new Loader)->load(TEST_FILES_PATH . 'configuration_logging.xml');

        $this->assertTrue($fromFile->logg


tian@phpunit.de>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */
namespace PHPUnit\Framework\MockObject\Stub;

use PHPUnit\Framework\Attributes\CoversClass;
use PHPUnit\Framework\Attributes\Group;
use PHPUnit\Framework\Attributes\Small;
use PHPUnit\Framework\Constraint\GreaterThan;
use PHPUnit\Framework\Constraint\IsIdentical;
use PHPUnit\Framework\ExpectationFailedException;
use PHPUnit\Framework\MockObject\Invocation;
us

rnsNullWhenNoEntryMatchesArguments(): void
    {
        $stub   = $this->createStub(AnInterface::class);
        $map    = new ReturnValueMap([[5, 'result']]);
        $result = $map->invoke(new Invocation(AnInterface::class, 'doSomething', [99], 'bool',

e PHPUnit\Framework\TestCase;
use PHPUnit\TestFixture\MockObject\AnInterface;

#[CoversClass(ReturnValueMap::class)]
#[Group('test-doubles')]
#[Small]
final class ReturnValueMapTest extends TestCase
{
    public function testRetu


 that was distributed with this source code.
 */
namespace PHPUnit\TextUI\CliArguments;

use const DIRECTORY_SEPARATOR;
use function chdir;
use function file_put_contents;
use function getcwd;
use function mkdir;
use function realpath;
use function rmdir;
use function sys_get_temp_dir;
use function uniqid;
use function unlink;
use PHPUnit\Framework\Attributes\CoversClass;
use PHPUnit\Framework\Attributes\Group;
use PHPUnit\Framework\Attributes\Medium;
use PHPUnit\Framework\TestCase;

#[CoversClass(XmlConfig

    private array $filesToRemove = [];

    /**
     * @var list<string>
     */
    private array $directoriesToRemove        = [];
    private ?string $previousWorkingDirectory = null;

    protected function tearDown(): void
    {
        if ($this->pre

urationFileFinder::class)]
#[Medium]
#[Group('textui')]
#[Group('textui/configuration')]
#[Group('textui/configuration/cli')]
final class XmlConfigurationFileFinderTest extends TestCase
{
    /**
     * @var list<string>
     */


se PHPUnit\Metadata\MetadataCollection;
use PHPUnit\TestFixture\RecordingSubscriber;
use PHPUnit\TextUI\CliArguments\Builder;
use PHPUnit\TextUI\Configuration\Merger;
use PHPUnit\TextUI\XmlConfiguration\DefaultConfiguration;

#[CoversClass(DispatchingEmitter::class)]
#[Small]
#[Group('event-system')]
#[Group('event-system/emitter')]
final class DispatchingEmitterTest extends Framework\TestCase
{
    #[TestDox('applicationStarted() emits Application\Started event')]
    public function testApplicationStarted

      {
                $this->record($event);
            }
        };

        $dispatcher = $this->dispatcherWithRegisteredSubscriber(
            Application\StartedSubscriber::class,
            Application\Started::class,
            $subscriber,

EmitsApplicationStartedEvent(): void
    {
        $subscriber = new class extends RecordingSubscriber implements Application\StartedSubscriber
        {
            public function notify(Application\Started $event): void


 * (c) Sebastian Bergmann <sebastian@phpunit.de>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */
namespace PHPUnit\Event\Code;

use PHPUnit\Framework\Attributes\CoversClass;
use PHPUnit\Framework\Attributes\Group;
use PHPUnit\Framework\Attributes\Small;
use PHPUnit\Framework\TestCase;

#[CoversClass(ClassMethod::class)]
#[Small]
#[Group('event-system')]
#[Group('event-system/value-objects')]
final class ClassMethodTest ext

etsValues(): void
    {
        $className  = self::class;
        $methodName = 'foo';

        $classMethod = new ClassMethod(
            $className,
            $methodName,
        );

        $this->assertSame($className, $classMethod->className());

ends TestCase
{
    public function testConstructorS


e(strict_types=1);
/*
 * This file is part of PHPUnit.
 *
 * (c) Sebastian Bergmann <sebastian@phpunit.de>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */
namespace PHPUnit\Event\Test;

use PHPUnit\Event\AbstractEventTestCase;
use PHPUnit\Framework\Attributes\CoversClass;
use PHPUnit\Framework\Attributes\Group;
use PHPUnit\Framework\Attributes\Small;

#[CoversClass(MockObjectCreated::class)]
#[Small]
#[Group('event-system'

    = 'OriginalType';

        $event = new MockObjectCreated(
            $telemetryInfo,
            $className,
        );

        $this->assertSame($telemetryInfo, $event->telemetryInfo());
        $this->assertSame($className, $event->className());

)]
#[Group('event-system/events')]
final class MockObjectCreatedTest extends AbstractEventTestCase
{
    public function testConstructorSetsValues(): void
    {
        $telemetryInfo = $this->telemetryInfo();
        $className


e(strict_types=1);
/*
 * This file is part of PHPUnit.
 *
 * (c) Sebastian Bergmann <sebastian@phpunit.de>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */
namespace PHPUnit\Event\Test;

use PHPUnit\Event\AbstractEventTestCase;
use PHPUnit\Framework\Attributes\CoversClass;
use PHPUnit\Framework\Attributes\Group;
use PHPUnit\Framework\Attributes\Small;

#[CoversClass(MockObjectForIntersectionOfInterfacesCreated::class)]
#[Sm

etryInfo = $this->telemetryInfo();
        $interfaces    = ['AnInterface', 'AnotherInterface'];

        $event = new MockObjectForIntersectionOfInterfacesCreated(
            $telemetryInfo,
            $interfaces,
        );

        $this->assertSame(

all]
#[Group('event-system')]
#[Group('event-system/events')]
final class MockObjectForIntersectionOfInterfacesCreatedTest extends AbstractEventTestCase
{
    public function testConstructorSetsValues(): void
    {
        $telem


s=1);
/*
 * This file is part of PHPUnit.
 *
 * (c) Sebastian Bergmann <sebastian@phpunit.de>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */
namespace PHPUnit\Event\Test;

use PHPUnit\Event\AbstractEventTestCase;
use PHPUnit\Framework\Attributes\CoversClass;
use PHPUnit\Framework\Attributes\Group;
use PHPUnit\Framework\Attributes\Small;

#[CoversClass(PartialMockObjectCreated::class)]
#[Small]
#[Group('event-system')]
#[G

     = 'OriginalType';
        $methodNames   = [
            'foo',
            'bar',
            'baz',
        ];

        $event = new PartialMockObjectCreated(
            $telemetryInfo,
            $className,
            ...$methodNames,
        )

roup('event-system/events')]
final class PartialMockObjectCreatedTest extends AbstractEventTestCase
{
    public function testConstructorSetsValues(): void
    {
        $telemetryInfo = $this->telemetryInfo();
        $className


e(strict_types=1);
/*
 * This file is part of PHPUnit.
 *
 * (c) Sebastian Bergmann <sebastian@phpunit.de>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */
namespace PHPUnit\Event\Test;

use PHPUnit\Event\AbstractEventTestCase;
use PHPUnit\Framework\Attributes\CoversClass;
use PHPUnit\Framework\Attributes\Group;
use PHPUnit\Framework\Attributes\Small;

#[CoversClass(TestStubCreated::class)]
#[Small]
#[Group('event-system')]

= 'OriginalType';

        $event = new TestStubCreated(
            $telemetryInfo,
            $className,
        );

        $this->assertSame($telemetryInfo, $event->telemetryInfo());
        $this->assertSame($className, $event->className());
    }

#[Group('event-system/events')]
final class TestStubCreatedTest extends AbstractEventTestCase
{
    public function testConstructorSetsValues(): void
    {
        $telemetryInfo = $this->telemetryInfo();
        $className


e(strict_types=1);
/*
 * This file is part of PHPUnit.
 *
 * (c) Sebastian Bergmann <sebastian@phpunit.de>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */
namespace PHPUnit\Event\Test;

use PHPUnit\Event\AbstractEventTestCase;
use PHPUnit\Framework\Attributes\CoversClass;
use PHPUnit\Framework\Attributes\Group;
use PHPUnit\Framework\Attributes\Small;

#[CoversClass(TestStubForIntersectionOfInterfacesCreated::class)]
#[Smal

Info = $this->telemetryInfo();
        $interfaces    = ['AnInterface', 'AnotherInterface'];

        $event = new TestStubForIntersectionOfInterfacesCreated(
            $telemetryInfo,
            $interfaces,
        );

        $this->assertSame($telem

l]
#[Group('event-system')]
#[Group('event-system/events')]
final class TestStubForIntersectionOfInterfacesCreatedTest extends AbstractEventTestCase
{
    public function testConstructorSetsValues(): void
    {
        $telemetry


e(strict_types=1);
/*
 * This file is part of PHPUnit.
 *
 * (c) Sebastian Bergmann <sebastian@phpunit.de>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */
namespace PHPUnit\Event\TestRunner;

use PHPUnit\Event\AbstractEventTestCase;
use PHPUnit\Framework\Attributes\CoversClass;
use PHPUnit\Framework\Attributes\Group;
use PHPUnit\Framework\Attributes\Small;

#[CoversClass(BootstrapFinished::class)]
#[Small]
#[Group('event-s

name      = 'bootstrap.php';

        $event = new BootstrapFinished(
            $telemetryInfo,
            $filename,
        );

        $this->assertSame($telemetryInfo, $event->telemetryInfo());
        $this->assertSame($filename, $event->filename()

ystem')]
#[Group('event-system/events')]
final class BootstrapFinishedTest extends AbstractEventTestCase
{
    public function testConstructorSetsValues(): void
    {
        $telemetryInfo = $this->telemetryInfo();
        $file


declare(strict_types=1);
/*
 * This file is part of PHPUnit.
 *
 * (c) Sebastian Bergmann <sebastian@phpunit.de>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */
namespace PHPUnit\Event\TestRunner;

use PHPUnit\Event\AbstractEventTestCase;
use PHPUnit\Framework\Attributes\CoversClass;
use PHPUnit\Framework\Attributes\Group;
use PHPUnit\Framework\Attributes\Small;

#[CoversClass(ChildProcessErrored::class)]
#[Small]
#[Group(

      $event = new ChildProcessErrored(
            $telemetryInfo,
        );

        $this->assertSame($telemetryInfo, $event->telemetryInfo());
    }

    public function testCanBeRepresentedAsString(): void
    {
        $event = new ChildProcessError

'event-system')]
#[Group('event-system/events')]
final class ChildProcessErroredTest extends AbstractEventTestCase
{
    public function testConstructorSetsValues(): void
    {
        $telemetryInfo = $this->telemetryInfo();


e(strict_types=1);
/*
 * This file is part of PHPUnit.
 *
 * (c) Sebastian Bergmann <sebastian@phpunit.de>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */
namespace PHPUnit\Event\TestRunner;

use PHPUnit\Event\AbstractEventTestCase;
use PHPUnit\Framework\Attributes\CoversClass;
use PHPUnit\Framework\Attributes\Group;
use PHPUnit\Framework\Attributes\Small;

#[CoversClass(ChildProcessFinished::class)]
#[Small]
#[Group('even

 $stdout        = 'output';
        $stderr        = 'error';

        $event = new ChildProcessFinished(
            $telemetryInfo,
            $stdout,
            $stderr,
        );

        $this->assertSame($telemetryInfo, $event->telemetryInfo());

t-system')]
#[Group('event-system/events')]
final class ChildProcessFinishedTest extends AbstractEventTestCase
{
    public function testConstructorSetsValues(): void
    {
        $telemetryInfo = $this->telemetryInfo();


declare(strict_types=1);
/*
 * This file is part of PHPUnit.
 *
 * (c) Sebastian Bergmann <sebastian@phpunit.de>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */
namespace PHPUnit\Event\TestRunner;

use PHPUnit\Event\AbstractEventTestCase;
use PHPUnit\Framework\Attributes\CoversClass;
use PHPUnit\Framework\Attributes\Group;
use PHPUnit\Framework\Attributes\Small;

#[CoversClass(ChildProcessStarted::class)]
#[Small]
#[Group(

      $event = new ChildProcessStarted(
            $telemetryInfo,
        );

        $this->assertSame($telemetryInfo, $event->telemetryInfo());
    }

    public function testCanBeRepresentedAsString(): void
    {
        $event = new ChildProcessStart

'event-system')]
#[Group('event-system/events')]
final class ChildProcessStartedTest extends AbstractEventTestCase
{
    public function testConstructorSetsValues(): void
    {
        $telemetryInfo = $this->telemetryInfo();


s=1);
/*
 * This file is part of PHPUnit.
 *
 * (c) Sebastian Bergmann <sebastian@phpunit.de>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */
namespace PHPUnit\Event\TestRunner;

use PHPUnit\Event\AbstractEventTestCase;
use PHPUnit\Framework\Attributes\CoversClass;
use PHPUnit\Framework\Attributes\Group;
use PHPUnit\Framework\Attributes\Small;
use PHPUnit\TextUI\CliArguments\Builder;
use PHPUnit\TextUI\Configuration\Config

edTest extends AbstractEventTestCase
{
    public function testConstructorSetsValues(): void
    {
        $telemetryInfo = $this->telemetryInfo();
        $configuration = $this->configuration();

        $event = new Configured(
            $telemetryInf

uration;
use PHPUnit\TextUI\Configuration\Merger;
use PHPUnit\TextUI\XmlConfiguration\DefaultConfiguration;

#[CoversClass(Configured::class)]
#[Small]
#[Group('event-system')]
#[Group('event-system/events')]
final class Configur


e(strict_types=1);
/*
 * This file is part of PHPUnit.
 *
 * (c) Sebastian Bergmann <sebastian@phpunit.de>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */
namespace PHPUnit\Event\TestRunner;

use PHPUnit\Event\AbstractEventTestCase;
use PHPUnit\Framework\Attributes\CoversClass;
use PHPUnit\Framework\Attributes\Group;
use PHPUnit\Framework\Attributes\Small;

#[CoversClass(DeprecationTriggered::class)]
#[Small]
#[Group('even

 $message       = 'message';

        $event = new DeprecationTriggered(
            $telemetryInfo,
            $message,
        );

        $this->assertSame($telemetryInfo, $event->telemetryInfo());
        $this->assertSame($message, $event->message()

t-system')]
#[Group('event-system/events')]
final class DeprecationTriggeredTest extends AbstractEventTestCase
{
    public function testConstructorSetsValues(): void
    {
        $telemetryInfo = $this->telemetryInfo();


hp declare(strict_types=1);
/*
 * This file is part of PHPUnit.
 *
 * (c) Sebastian Bergmann <sebastian@phpunit.de>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */
namespace PHPUnit\Event\TestRunner;

use PHPUnit\Event\AbstractEventTestCase;
use PHPUnit\Framework\Attributes\CoversClass;
use PHPUnit\Framework\Attributes\Group;
use PHPUnit\Framework\Attributes\Small;

#[CoversClass(EventFacadeSealed::class)]
#[Small]
#[Group

     $event = new EventFacadeSealed($telemetryInfo);

        $this->assertSame($telemetryInfo, $event->telemetryInfo());
    }

    public function testCanBeRepresentedAsString(): void
    {
        $event = new EventFacadeSealed($this->telemetryInfo());

('event-system')]
#[Group('event-system/events')]
final class EventFacadeSealedTest extends AbstractEventTestCase
{
    public function testConstructorSetsValues(): void
    {
        $telemetryInfo = $this->telemetryInfo();


declare(strict_types=1);
/*
 * This file is part of PHPUnit.
 *
 * (c) Sebastian Bergmann <sebastian@phpunit.de>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */
namespace PHPUnit\Event\TestRunner;

use PHPUnit\Event\AbstractEventTestCase;
use PHPUnit\Framework\Attributes\CoversClass;
use PHPUnit\Framework\Attributes\Group;
use PHPUnit\Framework\Attributes\Small;

#[CoversClass(ExecutionAborted::class)]
#[Small]
#[Group('ev

$event = new ExecutionAborted($telemetryInfo);

        $this->assertSame($telemetryInfo, $event->telemetryInfo());
    }

    public function testCanBeRepresentedAsString(): void
    {
        $telemetryInfo = $this->telemetryInfo();

        $event = new

ent-system')]
#[Group('event-system/events')]
final class ExecutionAbortedTest extends AbstractEventTestCase
{
    public function testConstructorSetsValues(): void
    {
        $telemetryInfo = $this->telemetryInfo();


declare(strict_types=1);
/*
 * This file is part of PHPUnit.
 *
 * (c) Sebastian Bergmann <sebastian@phpunit.de>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */
namespace PHPUnit\Event\TestRunner;

use PHPUnit\Event\AbstractEventTestCase;
use PHPUnit\Framework\Attributes\CoversClass;
use PHPUnit\Framework\Attributes\Group;
use PHPUnit\Framework\Attributes\Small;

#[CoversClass(ExecutionFinished::class)]
#[Small]
#[Group('e

  $event = new ExecutionFinished($telemetryInfo);

        $this->assertSame($telemetryInfo, $event->telemetryInfo());
    }

    public function testCanBeRepresentedAsString(): void
    {
        $telemetryInfo = $this->telemetryInfo();

        $event =

vent-system')]
#[Group('event-system/events')]
final class ExecutionFinishedTest extends AbstractEventTestCase
{
    public function testConstructorSetsValues(): void
    {
        $telemetryInfo = $this->telemetryInfo();