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;

use function PHPUnit\TestFixture\Generator\f;
use Countable;
use EmptyIterator;
use PHPUnit\Framework\Attributes\CoversClass;
use PHPUnit\Framework\Attributes\CoversMethod;
use PHPUnit\Framework\Attributes\DataProvider;
use PHPUnit\Framework\Attributes\Group;
use PHPUnit\Framewor

('framework/assertions')]
final class assertEmptyTest extends TestCase
{
    /**
     * @return non-empty-list<array{0: mixed}>
     */
    public static function successProvider(): array
    {
        return [
            [[]],
            [''],

k\Attributes\Small;
use PHPUnit\Framework\Attributes\TestDox;

#[CoversMethod(Assert::class, 'assertEmpty')]
#[CoversClass(GeneratorNotSupportedException::class)]
#[TestDox('assertEmpty()')]
#[Small]
#[Group('framework')]
#[Group


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

use PHPUnit\Framework\Attributes\CoversMethod;
use PHPUnit\Framework\Attributes\DataProviderExternal;
use PHPUnit\Framework\Attributes\Group;
use PHPUnit\Framework\Attributes\Small;
use PHPUnit\Framework\Attributes\TestDox;

#[CoversMe

ernal(assertFileExistsTest::class, 'failureProvider')]
    public function testSucceedsWhenConstraintEvaluatesToTrue(string $directory): void
    {
        $this->assertFileDoesNotExist($directory);
    }

    #[DataProviderExternal(assertFileExistsTest::c

thod(Assert::class, 'assertFileDoesNotExist')]
#[TestDox('assertFileDoesNotExist()')]
#[Small]
#[Group('framework')]
#[Group('framework/assertions')]
final class assertFileDoesNotExistTest extends TestCase
{
    #[DataProviderExt


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

use PHPUnit\Framework\Attributes\CoversMethod;
use PHPUnit\Framework\Attributes\Group;
use PHPUnit\Framework\Attributes\Small;
use PHPUnit\Framework\Attributes\TestDox;

#[CoversMethod(Assert::class, 'assertFileEquals')]
#[TestDox('ass

ertFileEquals(
            TEST_FILES_PATH . 'foo.xml',
            TEST_FILES_PATH . 'foo.xml',
        );
    }

    public function testFailsWhenConstraintEvaluatesToFalse(): void
    {
        $this->expectException(AssertionFailedError::class);

ertFileEquals()')]
#[Small]
#[Group('framework')]
#[Group('framework/assertions')]
final class assertFileEqualsTest extends TestCase
{
    public function testSucceedsWhenConstraintEvaluatesToTrue(): void
    {
        $this->ass


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;

use function fclose;
use function fopen;
use PHPUnit\Framework\Attributes\CoversMethod;
use PHPUnit\Framework\Attributes\DataProvider;
use PHPUnit\Framework\Attributes\Group;
use PHPUnit\Framework\Attributes\Small;
use PHPUnit\Framework\Attributes\TestDo

non-empty-list<array{0: mixed}>
     */
    public static function successProvider(): array
    {
        return [
            [true],
            [false],
        ];
    }

    /**
     * @return non-empty-list<array{0: mixed}>
     */
    public static f

x;
use stdClass;

#[CoversMethod(Assert::class, 'assertIsBool')]
#[TestDox('assertIsBool()')]
#[Small]
#[Group('framework')]
#[Group('framework/assertions')]
final class assertIsBoolTest extends TestCase
{
    /**
     * @return


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;

use const PHP_OS_FAMILY;
use function chmod;
use function octdec;
use function sys_get_temp_dir;
use function tempnam;
use function unlink;
use PHPUnit\Framework\Attributes\CoversMethod;
use PHPUnit\Framework\Attributes\Group;
use PHPUnit\Framework\Attri

tFileIsReadableTest extends TestCase
{
    private string $file;

    protected function setUp(): void
    {
        $this->file = tempnam(sys_get_temp_dir(), __CLASS__);
    }

    protected function tearDown(): void
    {
        @unlink($this->file);

butes\Small;
use PHPUnit\Framework\Attributes\TestDox;

#[CoversMethod(Assert::class, 'assertFileIsReadable')]
#[TestDox('assertFileIsReadable()')]
#[Small]
#[Group('framework')]
#[Group('framework/assertions')]
final class asser


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;

use PHPUnit\Framework\Attributes\CoversMethod;
use PHPUnit\Framework\Attributes\DataProvider;
use PHPUnit\Framework\Attributes\Group;
use PHPUnit\Framework\Attributes\Small;
use PHPUnit\Framework\Attributes\TestDox;

#[CoversMethod(Assert::class, 'assert

y{0: mixed, 1: mixed}>
     */
    public static function successProvider(): array
    {
        return [
            ['a', 'A'],
            [['a'], ['A']],
        ];
    }

    /**
     * @return non-empty-list<array{0: mixed, 1: mixed}>
     */
    pub

EqualsIgnoringCase')]
#[TestDox('assertEqualsIgnoringCase()')]
#[Small]
#[Group('framework')]
#[Group('framework/assertions')]
final class assertEqualsIgnoringCaseTest extends TestCase
{
    /**
     * @return non-empty-list<arra


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\Framework;

use PHPUnit\Framework\Attributes\CoversMethod;
use PHPUnit\Framework\Attributes\DataProviderExternal;
use PHPUnit\Framework\Attributes\Group;
use PHPUnit\Framework\Attributes\Small;
use PHPUnit\Framework\Attributes\TestDox;

#[CoversMethod(A

oviderExternal(assertEqualsIgnoringCaseTest::class, 'failureProvider')]
    public function testSucceedsWhenConstraintEvaluatesToTrue(mixed $expected, mixed $actual): void
    {
        $this->assertNotEqualsIgnoringCase($expected, $actual);
    }

    #[D

ssert::class, 'assertNotEqualsIgnoringCase')]
#[TestDox('assertNotEqualsIgnoringCase()')]
#[Small]
#[Group('framework')]
#[Group('framework/assertions')]
final class assertNotEqualsIgnoringCaseTest extends TestCase
{
    #[DataPr


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

use function file_get_contents;
use PHPUnit\Framework\Attributes\CoversMethod;
use PHPUnit\Framework\Attributes\Group;
use PHPUnit\Framework\Attributes\Small;
use PHPUnit\Framework\Attributes\TestDox;

#[CoversMethod(Assert::class, 'as

ntEvaluatesToTrue(): void
    {
        $this->assertStringEqualsFile(
            TEST_FILES_PATH . 'foo.xml',
            file_get_contents(TEST_FILES_PATH . 'foo.xml'),
        );
    }

    public function testFailsWhenConstraintEvaluatesToFalse(): voi

sertStringEqualsFile')]
#[TestDox('assertStringEqualsFile()')]
#[Small]
#[Group('framework')]
#[Group('framework/assertions')]
final class assertStringEqualsFileTest extends TestCase
{
    public function testSucceedsWhenConstrai


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;

use PHPUnit\Framework\Attributes\CoversMethod;
use PHPUnit\Framework\Attributes\DataProvider;
use PHPUnit\Framework\Attributes\Group;
use PHPUnit\Framework\Attributes\Small;
use PHPUnit\Framework\Attributes\TestDox;

#[CoversMethod(Assert::class, 'assertStringEqualsStringIgnoring

  * @return non-empty-list<array{0: non-empty-string, 1: non-empty-string}>
     */
    public static function successProvider(): array
    {
        return [
            ["a\nb", "a\r\nb"],
            ["a\rb", "a\r\nb"],
            ["a\r\nb", "a\r\nb"],

LineEndings')]
#[TestDox('assertStringEqualsStringIgnoringLineEndings()')]
#[Small]
#[Group('framework')]
#[Group('framework/assertions')]
final class assertStringEqualsStringIgnoringLineEndingsTest extends TestCase
{
    /**


ingEqualsStringIgnoringWhitespaceTest extends TestCase
{
    /**
     * @return non-empty-list<array{0: string, 1: string}>
     */
    public static function successProvider(): array
    {
        return [
            ['hello world', "hello\tworld"],

Whitespace')]
#[CoversMethod(Assert::class, 'stringEqualsStringIgnoringWhitespace')]
#[TestDox('assertStringEqualsStringIgnoringWhitespace()')]
#[Small]
#[Group('framework')]
#[Group('framework/assertions')]
final class assertStr


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;

use PHPUnit\Framework\Attributes\CoversMethod;
use PHPUnit\Framework\Attributes\Group;
use PHPUnit\Framework\Attributes\Small;
use PHPUnit\Framework\Attributes\TestDox;

#[CoversMethod(Assert::class, 'assertStringMatchesFormatFile')

tesToTrue(): void
    {
        $this->assertStringMatchesFormatFile(TEST_FILES_PATH . 'expectedFileFormat.txt', "FOO\n");
    }

    public function testFailsWhenConstraintEvaluatesToFalse(): void
    {
        $this->expectException(AssertionFailedError:

]
#[TestDox('assertStringMatchesFormatFile()')]
#[Small]
#[Group('framework')]
#[Group('framework/assertions')]
final class assertStringMatchesFormatFileTest extends TestCase
{
    public function testSucceedsWhenConstraintEvalua


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

use PHPUnit\Framework\Attributes\CoversMethod;
use PHPUnit\Framework\Attributes\Group;
use PHPUnit\Framework\Attributes\Small;
use PHPUnit\Framework\Attributes\TestDox;

#[CoversMethod(Assert::class, 'assertStringMatchesFormat')]

(): void
    {
        $this->assertStringMatchesFormat('*%s*', '***');
    }

    public function testFailsWhenConstraintEvaluatesToFalse(): void
    {
        $this->expectException(AssertionFailedError::class);

        $this->assertStringMatchesFormat(

#[TestDox('assertStringMatchesFormat()')]
#[Small]
#[Group('framework')]
#[Group('framework/assertions')]
final class assertStringMatchesFormatTest extends TestCase
{
    public function testSucceedsWhenConstraintEvaluatesToTrue


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;

use PHPUnit\Framework\Attributes\CoversMethod;
use PHPUnit\Framework\Attributes\Group;
use PHPUnit\Framework\Attributes\Small;
use PHPUnit\Framework\Attributes\TestDox;

#[CoversMethod(Assert::class, 'assertStringNotContainsStringIg

ion testSucceedsWhenConstraintEvaluatesToTrue(): void
    {
        $this->assertStringNotContainsStringIgnoringCase('BARBARA', 'foobarbaz');
    }

    public function testFailsWhenConstraintEvaluatesToFalse(): void
    {
        $this->expectException(As

noringCase')]
#[TestDox('assertStringNotContainsStringIgnoringCase()')]
#[Small]
#[Group('framework')]
#[Group('framework/assertions')]
final class assertStringNotContainsStringIgnoringCaseTest extends TestCase
{
    public funct


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

use PHPUnit\Framework\Attributes\CoversMethod;
use PHPUnit\Framework\Attributes\Group;
use PHPUnit\Framework\Attributes\Small;
use PHPUnit\Framework\Attributes\TestDox;

#[CoversMethod(Assert::class, 'assertStringNotContainsString

uatesToTrue(): void
    {
        $this->assertStringNotContainsString('barbara', 'foobarbaz');
    }

    public function testFailsWhenConstraintEvaluatesToFalse(): void
    {
        $this->expectException(AssertionFailedError::class);

        $this->as

')]
#[TestDox('assertStringNotContainsString()')]
#[Small]
#[Group('framework')]
#[Group('framework/assertions')]
final class assertStringNotContainsStringTest extends TestCase
{
    public function testSucceedsWhenConstraintEval


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\Framework;

use function file_get_contents;
use PHPUnit\Framework\Attributes\CoversMethod;
use PHPUnit\Framework\Attributes\Group;
use PHPUnit\Framework\Attributes\Small;
use PHPUnit\Framework\Attributes\TestDox;

#[CoversMethod(Assert::class, 'assertSt

    public function testSucceedsWhenConstraintEvaluatesToTrue(): void
    {
        $this->assertStringNotEqualsFileCanonicalizing(
            TEST_FILES_PATH . 'foo.txt',
            file_get_contents(TEST_FILES_PATH . 'foo.txt') . 'BAR',
        );

ringNotEqualsFileCanonicalizing')]
#[TestDox('assertStringNotEqualsFileCanonicalizing()')]
#[Small]
#[Group('framework')]
#[Group('framework/assertions')]
final class assertStringNotEqualsFileCanonicalizingTest extends TestCase
{


ublic function testSucceedsWhenConstraintEvaluatesToTrue(): void
    {
        $this->assertStringNotEqualsFileIgnoringCase(
            TEST_FILES_PATH . 'foo.xml',
            file_get_contents(TEST_FILES_PATH . 'bar.xml'),
        );
    }

    public f

ringNotEqualsFileIgnoringCase')]
#[TestDox('assertStringNotEqualsFileIgnoringCase()')]
#[Small]
#[Group('framework')]
#[Group('framework/assertions')]
final class assertStringNotEqualsFileIgnoringCaseTest extends TestCase
{
    p


s')]
final class assertStringNotEqualsFileIgnoringWhitespaceTest extends TestCase
{
    public function testSucceedsWhenConstraintEvaluatesToTrue(): void
    {
        $this->assertStringNotEqualsFileIgnoringWhitespace(
            TEST_FILES_PATH . 'strin

ringNotEqualsFileIgnoringWhitespace')]
#[CoversMethod(Assert::class, 'stringEqualsStringIgnoringWhitespace')]
#[TestDox('assertStringNotEqualsFileIgnoringWhitespace()')]
#[Small]
#[Group('framework')]
#[Group('framework/assertion


nConstraintEvaluatesToTrue(): void
    {
        $this->assertStringNotEqualsFile(
            TEST_FILES_PATH . 'foo.xml',
            file_get_contents(TEST_FILES_PATH . 'bar.xml'),
        );
    }

    public function testFailsWhenConstraintEvaluatesTo

sertStringNotEqualsFile')]
#[TestDox('assertStringNotEqualsFile()')]
#[Small]
#[Group('framework')]
#[Group('framework/assertions')]
final class assertStringNotEqualsFileTest extends TestCase
{
    public function testSucceedsWhe


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;

use PHPUnit\Framework\Attributes\CoversMethod;
use PHPUnit\Framework\Attributes\DataProviderExternal;
use PHPUnit\Framework\Attributes\Group;
use PHPUnit\Framework\Attributes\Small;
use PHPUnit\Framework\Attributes\TestDox;

#[CoversMethod(Assert::class,

work/assertions')]
final class assertStringNotEqualsStringIgnoringWhitespaceTest extends TestCase
{
    #[DataProviderExternal(assertStringEqualsStringIgnoringWhitespaceTest::class, 'failureProvider')]
    public function testSucceedsWhenConstraintEvaluate

 'assertStringNotEqualsStringIgnoringWhitespace')]
#[CoversMethod(Assert::class, 'stringEqualsStringIgnoringWhitespace')]
#[TestDox('assertStringNotEqualsStringIgnoringWhitespace()')]
#[Small]
#[Group('framework')]
#[Group('frame


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

use PHPUnit\Framework\Attributes\CoversMethod;
use PHPUnit\Framework\Attributes\Group;
use PHPUnit\Framework\Attributes\Small;
use PHPUnit\Framework\Attributes\TestDox;

#[CoversMethod(Assert::class, 'assertStringStartsNotWith')]

): void
    {
        $this->assertStringStartsNotWith('prefix', 'foo');
    }

    public function testFailsWhenConstraintEvaluatesToFalse(): void
    {
        $this->expectException(AssertionFailedError::class);

        $this->assertStringStartsNotWith

#[TestDox('assertStringStartsNotWith()')]
#[Small]
#[Group('framework')]
#[Group('framework/assertions')]
final class assertStringStartsNotWithTest extends TestCase
{
    public function testSucceedsWhenConstraintEvaluatesToTrue(


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

use PHPUnit\Framework\Attributes\CoversMethod;
use PHPUnit\Framework\Attributes\Group;
use PHPUnit\Framework\Attributes\Small;
use PHPUnit\Framework\Attributes\TestDox;

#[CoversMethod(Assert::class, 'assertStringStartsWith')]
#[

    {
        $this->assertStringStartsWith('prefix', 'prefixfoo');
    }

    public function testFailsWhenConstraintEvaluatesToFalse(): void
    {
        $this->expectException(AssertionFailedError::class);

        $this->assertStringStartsWith('prefix

TestDox('assertStringStartsWith()')]
#[Small]
#[Group('framework')]
#[Group('framework/assertions')]
final class assertStringStartsWithTest extends TestCase
{
    public function testSucceedsWhenConstraintEvaluatesToTrue(): void


it\Framework\Attributes\DoesNotPerformAssertions;
use PHPUnit\Framework\Attributes\Group;
use PHPUnit\Framework\Attributes\Small;
use PHPUnit\Framework\Attributes\TestDox;
use PHPUnit\TestFixture\Book;
use PHPUnit\TestFixture\ObjectEquals\ValueObject;
use stdClass;

#[CoversClass(Assert::class)]
#[TestDox('assertThat()')]
#[Small]
#[Group('framework')]
#[Group('framework/assertions')]
final class assertThatTest extends TestCase
{
    #[DoesNotPerformAssertions]
    public function testAssertThatAnything():

(): void
    {
        $this->assertThat(false, $this->isFalse());
    }

    public function testAssertThatIsJson(): void
    {
        $this->assertThat('{}', $this->isJson());
    }

    #[DoesNotPerformAssertions]
    public function testAssertThatAnyt

void
    {
        $this->assertThat('anything', $this->anything());
    }

    public function testAssertThatIsTrue(): void
    {
        $this->assertThat(true, $this->isTrue());
    }

    public function testAssertThatIsFalse


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

use PHPUnit\Framework\Attributes\CoversMethod;
use PHPUnit\Framework\Attributes\Group;
use PHPUnit\Framework\Attributes\Small;
use PHPUnit\Framework\Attributes\TestDox;

#[CoversMethod(Assert::class, 'assertTrue')]
#[TestDox('ass

);
    }

    public function testFailsWhenConstraintEvaluatesToFalse(): void
    {
        $this->expectException(AssertionFailedError::class);

        /* @noinspection PhpUnitAssertCanBeReplacedWithFailInspection */
        $this->assertTrue(false);

ertTrue()')]
#[Small]
#[Group('framework')]
#[Group('framework/assertions')]
final class assertTrueTest extends TestCase
{
    public function testSucceedsWhenConstraintEvaluatesToTrue(): void
    {
        $this->assertTrue(true


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\Framework;

use PHPUnit\Framework\Attributes\CoversMethod;
use PHPUnit\Framework\Attributes\Group;
use PHPUnit\Framework\Attributes\Small;
use PHPUnit\Framework\Attributes\TestDox;

#[CoversMethod(Assert::class, 'assertXmlFileEqualsXmlFileConsideringCom

nction testSucceedsWhenConstraintEvaluatesToTrue(): void
    {
        $this->assertXmlFileEqualsXmlFileConsideringComments(
            TEST_FILES_PATH . 'xml-with-comments.xml',
            TEST_FILES_PATH . 'xml-with-comments.xml',
        );
    }

ments')]
#[TestDox('assertXmlFileEqualsXmlFileConsideringComments()')]
#[Small]
#[Group('framework')]
#[Group('framework/assertions')]
final class assertXmlFileEqualsXmlFileConsideringCommentsTest extends TestCase
{
    public fu


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

use PHPUnit\Framework\Attributes\CoversMethod;
use PHPUnit\Framework\Attributes\Group;
use PHPUnit\Framework\Attributes\Small;
use PHPUnit\Framework\Attributes\TestDox;

#[CoversMethod(Assert::class, 'assertStringContainsString')]

ue(): void
    {
        $this->assertStringContainsString('bar', 'foobarbaz');
    }

    public function testFailsWhenConstraintEvaluatesToFalse(): void
    {
        $this->expectException(AssertionFailedError::class);

        $this->assertStringContai

#[TestDox('assertStringContainsString()')]
#[Small]
#[Group('framework')]
#[Group('framework/assertions')]
final class assertStringContainsStringTest extends TestCase
{
    public function testSucceedsWhenConstraintEvaluatesToTr


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

use PHPUnit\Framework\Attributes\CoversMethod;
use PHPUnit\Framework\Attributes\Group;
use PHPUnit\Framework\Attributes\Small;
use PHPUnit\Framework\Attributes\TestDox;

#[CoversMethod(Assert::class, 'assertStringEndsWith')]
#[Te

        $this->assertStringEndsWith('suffix', 'foosuffix');
    }

    public function testFailsWhenConstraintEvaluatesToFalse(): void
    {
        $this->expectException(AssertionFailedError::class);

        $this->assertStringEndsWith('suffix', 'foo');

stDox('assertStringEndsWith()')]
#[Small]
#[Group('framework')]
#[Group('framework/assertions')]
final class assertStringEndsWithTest extends TestCase
{
    public function testSucceedsWhenConstraintEvaluatesToTrue(): void
    {


inal class assertStringEqualsFileIgnoringWhitespaceTest extends TestCase
{
    public function testSucceedsWhenConstraintEvaluatesToTrue(): void
    {
        $this->assertStringEqualsFileIgnoringWhitespace(
            TEST_FILES_PATH . 'string_with_space

ringEqualsFileIgnoringWhitespace')]
#[CoversMethod(Assert::class, 'stringEqualsStringIgnoringWhitespace')]
#[TestDox('assertStringEqualsFileIgnoringWhitespace()')]
#[Small]
#[Group('framework')]
#[Group('framework/assertions')]
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;

use PHPUnit\Framework\Attributes\CoversMethod;
use PHPUnit\Framework\Attributes\DataProvider;
use PHPUnit\Framework\Attributes\Group;
use PHPUnit\Framework\Attributes\Small;
use PHPUnit\Framework\Attributes\TestDox;

#[CoversMethod(Assert::class, 'assert

on-empty-list<array{0: non-empty-string, 1: non-empty-string}>
     */
    public static function successProvider(): array
    {
        return [
            ['/foo/', 'foobar'],
        ];
    }

    /**
     * @return non-empty-list<array{0: non-empty-st

MatchesRegularExpression')]
#[TestDox('assertMatchesRegularExpression()')]
#[Small]
#[Group('framework')]
#[Group('framework/assertions')]
final class assertMatchesRegularExpressionTest extends TestCase
{
    /**
     * @return n


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

use const NAN;
use PHPUnit\Framework\Attributes\CoversMethod;
use PHPUnit\Framework\Attributes\Group;
use PHPUnit\Framework\Attributes\Small;
use PHPUnit\Framework\Attributes\TestDox;

#[CoversMethod(Assert::class, 'assertNan')]
#[TestDox('assertNan()')]
#[Small]
#[Group('framework')]
#[Group('framework/assertions')]
fina

function testSucceedsWhenConstraintEvaluatesToTrue(): void
    {
        $this->assertNan(NAN);
    }

    public function testFailsWhenConstraintEvaluatesToFalse(): void
    {
        $this->expectException(AssertionFailedError::class);

        $this->as

l class assertNanTest extends TestCase
{
    public


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;

use function PHPUnit\TestFixture\Generator\f;
use Countable;
use PHPUnit\Framework\Attributes\CoversClass;
use PHPUnit\Framework\Attributes\CoversMethod;
use PHPUnit\Framework\Attributes\DataProviderExternal;
use PHPUnit\Framework\Attributes\Group;
use P

'framework')]
#[Group('framework/assertions')]
final class assertNotCountTest extends TestCase
{
    #[DataProviderExternal(assertCountTest::class, 'failureProvider')]
    public function testSucceedsWhenConstraintEvaluatesToTrue(int $expectedCount, Counta

HPUnit\Framework\Attributes\Small;
use PHPUnit\Framework\Attributes\TestDox;

#[CoversMethod(Assert::class, 'assertNotCount')]
#[CoversClass(GeneratorNotSupportedException::class)]
#[TestDox('assertNotCount()')]
#[Small]
#[Group(


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\Framework;

use PHPUnit\Framework\Attributes\CoversMethod;
use PHPUnit\Framework\Attributes\DataProviderExternal;
use PHPUnit\Framework\Attributes\Group;
use PHPUnit\Framework\Attributes\Small;
use PHPUnit\Framework\Attributes\TestDox;

#[CoversMethod(A

DataProviderExternal(assertEqualsCanonicalizingTest::class, 'failureProvider')]
    public function testSucceedsWhenConstraintEvaluatesToTrue(mixed $expected, mixed $actual): void
    {
        $this->assertNotEqualsCanonicalizing($expected, $actual);

ssert::class, 'assertNotEqualsCanonicalizing')]
#[TestDox('assertNotEqualsCanonicalizing()')]
#[Small]
#[Group('framework')]
#[Group('framework/assertions')]
final class assertNotEqualsCanonicalizingTest extends TestCase
{
    #[


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

use PHPUnit\Framework\Attributes\CoversMethod;
use PHPUnit\Framework\Attributes\DataProviderExternal;
use PHPUnit\Framework\Attributes\Group;
use PHPUnit\Framework\Attributes\Small;
use PHPUnit\Framework\Attributes\TestDox;

#[CoversMe

t::class, 'failureProvider')]
    public function testSucceedsWhenConstraintEvaluatesToTrue(mixed $expected, mixed $actual): void
    {
        $this->assertNotEquals($expected, $actual);
    }

    #[DataProviderExternal(assertEqualsTest::class, 'successP

thod(Assert::class, 'assertNotEquals')]
#[TestDox('assertNotEquals()')]
#[Small]
#[Group('framework')]
#[Group('framework/assertions')]
final class assertNotEqualsTest extends TestCase
{
    #[DataProviderExternal(assertEqualsTes


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\Framework;

use PHPUnit\Framework\Attributes\CoversMethod;
use PHPUnit\Framework\Attributes\DataProvider;
use PHPUnit\Framework\Attributes\Group;
use PHPUnit\Framework\Attributes\Small;
use PHPUnit\Framework\Attributes\TestDox;

#[CoversMethod(Assert::c

 */
    public static function successProvider(): array
    {
        return [
            [true],
            [null],
            [0],
            [1],
            ['false'],
        ];
    }

    #[DataProvider('successProvider')]
    public function tes

lass, 'assertNotFalse')]
#[TestDox('assertNotFalse()')]
#[Small]
#[Group('framework')]
#[Group('framework/assertions')]
final class assertNotFalseTest extends TestCase
{
    /**
     * @return non-empty-list<array{0: mixed}>


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;

use PHPUnit\Framework\Attributes\CoversMethod;
use PHPUnit\Framework\Attributes\DataProviderExternal;
use PHPUnit\Framework\Attributes\Group;
use PHPUnit\Framework\Attributes\Small;
use PHPUnit\Framework\Attributes\TestDox;

#[Cover

ass, 'failureProvider')]
    public function testSucceedsWhenConstraintEvaluatesToTrue(mixed $actual): void
    {
        $this->assertNotNull($actual);
    }

    public function testFailsWhenConstraintEvaluatesToFalse(): void
    {
        $this->expectE

sMethod(Assert::class, 'assertNotNull')]
#[TestDox('assertNotNull()')]
#[Small]
#[Group('framework')]
#[Group('framework/assertions')]
final class assertNotNullTest extends TestCase
{
    #[DataProviderExternal(assertNullTest::cl


, 'failureProvider')]
    public function testSucceedsWhenConstraintEvaluatesToTrue(mixed $expected, mixed $actual): void
    {
        $this->assertNotSame($expected, $actual);
    }

    #[DataProviderExternal(assertSameTest::class, 'successProvider')]

thod(Assert::class, 'assertNotSame')]
#[TestDox('assertNotSame()')]
#[Small]
#[Group('framework')]
#[Group('framework/assertions')]
final class assertNotSameTest extends TestCase
{
    #[DataProviderExternal(assertSameTest::class


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;

use function fclose;
use function fopen;
use PHPUnit\Framework\Attributes\CoversMethod;
use PHPUnit\Framework\Attributes\DataProvider;
use PHPUnit\Framework\Attributes\Group;
use PHPUnit\Framework\Attributes\Small;
use PHPUnit\Framework\Attributes\TestDo

pty-list<array{0: mixed}>
     */
    public static function failureProvider(): array
    {
        $openResource = fopen(__FILE__, 'r');

        $closedResource = fopen(__FILE__, 'r');
        fclose($closedResource);

        return [
            [['foo

x;
use stdClass;

#[CoversMethod(Assert::class, 'assertNull')]
#[TestDox('assertNull()')]
#[Small]
#[Group('framework')]
#[Group('framework/assertions')]
final class assertNullTest extends TestCase
{
    /**
     * @return non-em


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

use PHPUnit\Framework\Attributes\CoversMethod;
use PHPUnit\Framework\Attributes\Group;
use PHPUnit\Framework\Attributes\Small;
use PHPUnit\Framework\Attributes\TestDox;
use stdClass;

#[CoversMethod(Assert::class, 'assertObjectHasPrope

ue(): void
    {
        $object              = new stdClass;
        $object->theProperty = 'value';

        $this->assertObjectHasProperty('theProperty', $object);
    }

    public function testFailsWhenConstraintEvaluatesToFalse(): void
    {

rty')]
#[TestDox('assertObjectHasProperty()')]
#[Small]
#[Group('framework')]
#[Group('framework/assertions')]
final class assertObjectHasPropertyTest extends TestCase
{
    public function testSucceedsWhenConstraintEvaluatesToTr


ertObjectEqualsTest::class, 'failureProvider')]
    public function testSucceedsWhenConstraintEvaluatesToTrue(object $expected, object $actual, string $method): void
    {
        $this->assertObjectNotEquals($expected, $actual, $method);
    }

    #[Data

ssert::class, 'assertObjectNotEquals')]
#[TestDox('assertObjectNotEquals()')]
#[Small]
#[Group('framework')]
#[Group('framework/assertions')]
final class assertObjectNotEqualsTest extends TestCase
{
    #[DataProviderExternal(ass


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;

use function PHPUnit\TestFixture\Generator\f;
use Countable;
use PHPUnit\Framework\Attributes\CoversClass;
use PHPUnit\Framework\Attributes\CoversMethod;
use PHPUnit\Framework\Attributes\DataProvider;
use PHPUnit\Framework\Attributes\Group;
use PHPUnit\Framework\Attributes\Small;

ssertions')]
final class assertSameSizeTest extends TestCase
{
    /**
     * @return non-empty-list<array{0: Countable|iterable<mixed>, 1: Countable|iterable<mixed>}>
     */
    public static function successProvider(): array
    {
        return [

use PHPUnit\Framework\Attributes\TestDox;

#[CoversMethod(Assert::class, 'assertSameSize')]
#[CoversClass(GeneratorNotSupportedException::class)]
#[TestDox('assertSameSize()')]
#[Small]
#[Group('framework')]
#[Group('framework/a


t extends TestCase
{
    /**
     * @return non-empty-list<array{0: non-empty-string, 1: non-empty-string}>
     */
    public static function successProvider(): array
    {
        return [
            ["b\nc", "b\r\nc"],
            ["b\nc", "a\r\nb\r\nc

StringContainsStringIgnoringLineEndings')]
#[TestDox('assertStringContainsStringIgnoringLineEndings()')]
#[Small]
#[Group('framework')]
#[Group('framework/assertions')]
final class assertStringContainsStringIgnoringLineEndingsTes


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\Framework;

use function file_get_contents;
use PHPUnit\Framework\Attributes\CoversMethod;
use PHPUnit\Framework\Attributes\Group;
use PHPUnit\Framework\Attributes\Small;
use PHPUnit\Framework\Attributes\TestDox;

#[CoversMethod(Assert::class, 'assertSt

ic function testSucceedsWhenConstraintEvaluatesToTrue(): void
    {
        $this->assertStringEqualsFileCanonicalizing(
            TEST_FILES_PATH . 'foo.txt',
            file_get_contents(TEST_FILES_PATH . 'foo.txt'),
        );
    }

    public funct

ringEqualsFileCanonicalizing')]
#[TestDox('assertStringEqualsFileCanonicalizing()')]
#[Small]
#[Group('framework')]
#[Group('framework/assertions')]
final class assertStringEqualsFileCanonicalizingTest extends TestCase
{
    publ


ction testSucceedsWhenConstraintEvaluatesToTrue(): void
    {
        $this->assertStringEqualsFileIgnoringCase(
            TEST_FILES_PATH . 'foo.xml',
            file_get_contents(TEST_FILES_PATH . 'fooUppercase.xml'),
        );
    }

    public func

ringEqualsFileIgnoringCase')]
#[TestDox('assertStringEqualsFileIgnoringCase()')]
#[Small]
#[Group('framework')]
#[Group('framework/assertions')]
final class assertStringEqualsFileIgnoringCaseTest extends TestCase
{
    public fun


est::class, 'failureProvider')]
    public function testSucceedsWhenConstraintEvaluatesToTrue(mixed $needle, iterable $haystack): void
    {
        $this->assertNotContains($needle, $haystack);
    }

    #[DataProviderExternal(assertContainsTest::class,

ssert::class, 'assertNotContains')]
#[TestDox('assertNotContains()')]
#[Small]
#[Group('framework')]
#[Group('framework/assertions')]
final class assertNotContainsTest extends TestCase
{
    #[DataProviderExternal(assertContainsT


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;

use PHPUnit\Framework\Attributes\CoversMethod;
use PHPUnit\Framework\Attributes\Group;
use PHPUnit\Framework\Attributes\Small;
use PHPUnit\Framework\Attributes\TestDox;

#[CoversMethod(Assert::class, 'assertStringContainsStringIgnor

ucceedsWhenConstraintEvaluatesToTrue(): void
    {
        $this->assertStringContainsStringIgnoringCase('BAR', 'foobarbaz');
    }

    public function testFailsWhenConstraintEvaluatesToFalse(): void
    {
        $this->expectException(AssertionFailedErr

ingCase')]
#[TestDox('assertStringContainsStringIgnoringCase()')]
#[Small]
#[Group('framework')]
#[Group('framework/assertions')]
final class assertStringContainsStringIgnoringCaseTest extends TestCase
{
    public function testS


>
     */
    public static function failureProvider(): array
    {
        return [
            [1, 2],
            [1, 1],
        ];
    }

    public function testSucceedsWhenConstraintEvaluatesToTrue(): void
    {
        $this->assertLessThan(2, 1);

lass, 'assertLessThan')]
#[TestDox('assertLessThan()')]
#[Small]
#[Group('framework')]
#[Group('framework/assertions')]
final class assertLessThanTest extends TestCase
{
    /**
     * @return non-empty-list<array{0: int, 1: 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\Framework;

use function PHPUnit\TestFixture\Generator\f;
use PHPUnit\Framework\Attributes\CoversClass;
use PHPUnit\Framework\Attributes\CoversMethod;
use PHPUnit\Framework\Attributes\DataProviderExternal;
use PHPUnit\Framework\Attributes\Group;
use PHPUnit\Framewor

[Group('framework/assertions')]
final class assertNotEmptyTest extends TestCase
{
    #[DataProviderExternal(assertEmptyTest::class, 'failureProvider')]
    public function testSucceedsWhenConstraintEvaluatesToTrue(mixed $actual): void
    {
        $this-

k\Attributes\Small;
use PHPUnit\Framework\Attributes\TestDox;

#[CoversMethod(Assert::class, 'assertNotEmpty')]
#[CoversClass(GeneratorNotSupportedException::class)]
#[TestDox('assertNotEmpty()')]
#[Small]
#[Group('framework')]
#


ernal(assertEqualsWithDeltaTest::class, 'failureProvider')]
    public function testSucceedsWhenConstraintEvaluatesToTrue(mixed $expected, mixed $actual, float $delta): void
    {
        $this->assertNotEqualsWithDelta($expected, $actual, $delta);
    }

ssert::class, 'assertNotEqualsWithDelta')]
#[TestDox('assertNotEqualsWithDelta()')]
#[Small]
#[Group('framework')]
#[Group('framework/assertions')]
final class assertNotEqualsWithDeltaTest extends TestCase
{
    #[DataProviderExt


    public static function successProvider(): array
    {
        return [
            [false],
            [null],
            [0],
            [1],
            ['true'],
        ];
    }

    #[DataProvider('successProvider')]
    public function testSu

lass, 'assertNotTrue')]
#[TestDox('assertNotTrue()')]
#[Small]
#[Group('framework')]
#[Group('framework/assertions')]
final class assertNotTrueTest extends TestCase
{
    /**
     * @return non-empty-list<array{0: mixed}>
     */


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;

use PHPUnit\Framework\Attributes\CoversMethod;
use PHPUnit\Framework\Attributes\DataProvider;
use PHPUnit\Framework\Attributes\Group;
use PHPUnit\Framework\Attributes\Small;
use PHPUnit\Framework\Attributes\TestDox;
use PHPUnit\TestFixture\ObjectEquals\V

   * @return non-empty-list<array{0: object, 1: object, 2: non-empty-string}>
     */
    public static function successProvider(): array
    {
        return [
            [new ValueObject(1), new ValueObject(1), 'equals'],
        ];
    }

    /**

alueObject;

#[CoversMethod(Assert::class, 'assertObjectEquals')]
#[TestDox('assertObjectEquals()')]
#[Small]
#[Group('framework')]
#[Group('framework/assertions')]
final class assertObjectEqualsTest extends TestCase
{
    /**


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;

use const INF;
use function array_merge;
use function fopen;
use function log;
use PHPUnit\Framework\Attributes\CoversMethod;
use PHPUnit\Framework\Attributes\DataProvider;
use PHPUnit\Framework\Attributes\Group;
use PHPUnit\Framework\Attributes\Small;
use PHPUnit\Framework\Attri

ase
{
    /**
     * @return non-empty-list<array{0: mixed, 1: mixed}>
     */
    public static function successProvider(): array
    {
        return self::sameValues();
    }

    /**
     * @return non-empty-list<array{0: mixed, 1: mixed}>
     */

butes\TestDox;
use PHPUnit\TestFixture\SampleClass;

#[CoversMethod(Assert::class, 'assertSame')]
#[TestDox('assertSame()')]
#[Small]
#[Group('framework')]
#[Group('framework/assertions')]
final class assertSameTest extends TestC


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\Framework;

use PHPUnit\Framework\Attributes\CoversMethod;
use PHPUnit\Framework\Attributes\Group;
use PHPUnit\Framework\Attributes\Small;
use PHPUnit\Framework\Attributes\TestDox;

#[CoversMethod(Assert::class, 'assertXmlFileNotEqualsXmlFileConsidering

public function testSucceedsWhenConstraintEvaluatesToTrue(): void
    {
        $this->assertXmlFileNotEqualsXmlFileConsideringComments(
            TEST_FILES_PATH . 'xml-with-comments.xml',
            TEST_FILES_PATH . 'xml-without-comments.xml',

Comments')]
#[TestDox('assertXmlFileNotEqualsXmlFileConsideringComments()')]
#[Small]
#[Group('framework')]
#[Group('framework/assertions')]
final class assertXmlFileNotEqualsXmlFileConsideringCommentsTest extends TestCase
{


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\Framework;

use function file_get_contents;
use PHPUnit\Framework\Attributes\CoversMethod;
use PHPUnit\Framework\Attributes\Group;
use PHPUnit\Framework\Attributes\Small;
use PHPUnit\Framework\Attributes\TestDox;

#[CoversMethod(Assert::class, 'assertXm

WhenConstraintEvaluatesToTrue(): void
    {
        $this->assertXmlStringEqualsXmlFile(
            TEST_FILES_PATH . 'foo.xml',
            file_get_contents(TEST_FILES_PATH . 'foo.xml'),
        );
    }

    public function testFailsWhenConstraintEvalu

lStringEqualsXmlFile')]
#[TestDox('assertXmlStringEqualsXmlFile()')]
#[Small]
#[Group('framework')]
#[Group('framework/assertions')]
final class assertXmlStringEqualsXmlFileTest extends TestCase
{
    public function testSucceeds


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;

use PHPUnit\Framework\Attributes\CoversMethod;
use PHPUnit\Framework\Attributes\DataProvider;
use PHPUnit\Framework\Attributes\Group;
use PHPUnit\Framework\Attributes\Small;
use PHPUnit\Framework\Attributes\TestDox;

#[CoversMethod(Assert::class, 'assertXmlStringEqualsXmlStringCo

Case
{
    /**
     * @return non-empty-list<array{0: non-empty-string, 1: non-empty-string}>
     */
    public static function successProvider(): array
    {
        return [
            ['<root><node/></root>', '<root><node/></root>'],
            ['<ro

nsideringComments')]
#[TestDox('assertXmlStringEqualsXmlStringConsideringComments()')]
#[Small]
#[Group('framework')]
#[Group('framework/assertions')]
final class assertXmlStringEqualsXmlStringConsideringCommentsTest extends Test


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;

use function file_get_contents;
use PHPUnit\Framework\Attributes\CoversMethod;
use PHPUnit\Framework\Attributes\Group;
use PHPUnit\Framework\Attributes\Small;
use PHPUnit\Framework\Attributes\TestDox;

#[CoversMethod(Assert::class, 'assertXmlStringNotEqu

ConstraintEvaluatesToTrue(): void
    {
        $this->assertXmlStringNotEqualsXmlFile(
            TEST_FILES_PATH . 'foo.xml',
            file_get_contents(TEST_FILES_PATH . 'bar.xml'),
        );
    }

    public function testFailsWhenConstraintEvalua

alsXmlFile')]
#[TestDox('assertXmlStringNotEqualsXmlFile()')]
#[Small]
#[Group('framework')]
#[Group('framework/assertions')]
final class assertXmlStringNotEqualsXmlFileTest extends TestCase
{
    public function testSucceedsWhen


ase
{
    #[DataProviderExternal(assertXmlStringEqualsXmlStringTest::class, 'failureProvider')]
    public function testSucceedsWhenConstraintEvaluatesToTrue(string $expectedXml, string $actualXml): void
    {
        $this->assertXmlStringNotEqualsXmlStri

ssert::class, 'assertXmlStringNotEqualsXmlString')]
#[TestDox('assertXmlStringNotEqualsXmlString()')]
#[Small]
#[Group('framework')]
#[Group('framework/assertions')]
final class assertXmlStringNotEqualsXmlStringTest extends TestC


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

use PHPUnit\Framework\Attributes\CoversMethod;
use PHPUnit\Framework\Attributes\Group;
use PHPUnit\Framework\Attributes\Small;
use PHPUnit\Framework\Attributes\TestDox;

#[CoversMethod(Assert::class, 'fail')]
#[TestDox('fail()')]
#[Small]
#[Group('fram

s failTest extends TestCase
{
    public function testFailsTest(): void
    {
        $message = 'message';

        $this->expectException(AssertionFailedError::class);
        $this->expectExceptionMessageIs($message);

        $this->fail($message);

ework')]
#[Group('framework/assertions')]
final clas


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\Group;
use PHPUnit\Framework\Attributes\Small;
use PHPUnit\Framework\ExpectationFailedException;
use PHPUnit\Framework\TestCase;

#[CoversClass(Callback::class)]
#[CoversClass(Constraint::cl

)->evaluate('actual', returnResult: true));
        $this->assertFalse($this->rejectingCallbackConstraint()->evaluate('actual', returnResult: true));

        try {
            $this->rejectingCallbackConstraint()->evaluate('actual');
        } catch (Expe

ass)]
#[Small]
#[Group('framework')]
#[Group('framework/constraints')]
final class CallbackTest extends TestCase
{
    public function testCanBeEvaluated(): void
    {
        $this->assertTrue($this->acceptingCallbackConstraint(


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\Framework;

use PHPUnit\Framework\Attributes\CoversMethod;
use PHPUnit\Framework\Attributes\DataProviderExternal;
use PHPUnit\Framework\Attributes\Group;
use PHPUnit\Framework\Attributes\Small;
use PHPUnit\Framework\Attributes\TestDox;

#[CoversMethod(A

al(assertContainsEqualsTest::class, 'failureProvider')]
    public function testSucceedsWhenConstraintEvaluatesToTrue(mixed $needle, iterable $haystack): void
    {
        $this->assertNotContainsEquals($needle, $haystack);
    }

    #[DataProviderExtern

ssert::class, 'assertNotContainsEquals')]
#[TestDox('assertNotContainsEquals()')]
#[Small]
#[Group('framework')]
#[Group('framework/assertions')]
final class assertNotContainsEqualsTest extends TestCase
{
    #[DataProviderExtern


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;

use Countable;
use PHPUnit\Framework\Attributes\CoversMethod;
use PHPUnit\Framework\Attributes\DataProviderExternal;
use PHPUnit\Framework\Attributes\Group;
use PHPUnit\Framework\Attributes\Small;
use PHPUnit\Framework\Attributes\TestDox;

#[CoversMethod

eTest::class, 'failureProvider')]
    public function testSucceedsWhenConstraintEvaluatesToTrue(Countable|iterable $expected, Countable|iterable $actual): void
    {
        $this->assertNotSameSize($expected, $actual);
    }

    #[DataProviderExternal(as

(Assert::class, 'assertNotSameSize')]
#[TestDox('assertNotSameSize()')]
#[Small]
#[Group('framework')]
#[Group('framework/assertions')]
final class assertNotSameSizeTest extends TestCase
{
    #[DataProviderExternal(assertSameSiz


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\Framework;

use PHPUnit\Framework\Attributes\CoversMethod;
use PHPUnit\Framework\Attributes\Group;
use PHPUnit\Framework\Attributes\Small;
use PHPUnit\Framework\Attributes\TestDox;

#[CoversMethod(Assert::class, 'assertXmlFileEqualsXmlFile')]
#[TestDox(

    {
        $this->assertXmlFileEqualsXmlFile(
            TEST_FILES_PATH . 'foo.xml',
            TEST_FILES_PATH . 'foo.xml',
        );
    }

    public function testFailsWhenConstraintEvaluatesToFalse(): void
    {
        $this->expectException(As

'assertXmlFileEqualsXmlFile()')]
#[Small]
#[Group('framework')]
#[Group('framework/assertions')]
final class assertXmlFileEqualsXmlFileTest extends TestCase
{
    public function testSucceedsWhenConstraintEvaluatesToTrue(): 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\Framework;

use PHPUnit\Framework\Attributes\CoversMethod;
use PHPUnit\Framework\Attributes\Group;
use PHPUnit\Framework\Attributes\Small;
use PHPUnit\Framework\Attributes\TestDox;

#[CoversMethod(Assert::class, 'assertXmlStringEqualsXmlFileConsideringC

lic function testSucceedsWhenConstraintEvaluatesToTrue(): void
    {
        $this->assertXmlStringEqualsXmlFileConsideringComments(
            TEST_FILES_PATH . 'xml-with-comments.xml',
            '<root><!-- a comment --><node/></root>',
        );

omments')]
#[TestDox('assertXmlStringEqualsXmlFileConsideringComments()')]
#[Small]
#[Group('framework')]
#[Group('framework/assertions')]
final class assertXmlStringEqualsXmlFileConsideringCommentsTest extends TestCase
{
    pub


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\Framework;

use PHPUnit\Framework\Attributes\CoversMethod;
use PHPUnit\Framework\Attributes\Group;
use PHPUnit\Framework\Attributes\Small;
use PHPUnit\Framework\Attributes\TestDox;

#[CoversMethod(Assert::class, 'assertXmlStringNotEqualsXmlFileConsideri

{
    public function testSucceedsWhenConstraintEvaluatesToTrue(): void
    {
        $this->assertXmlStringNotEqualsXmlFileConsideringComments(
            TEST_FILES_PATH . 'xml-with-comments.xml',
            '<root><node/></root>',
        );
    }

ngComments')]
#[TestDox('assertXmlStringNotEqualsXmlFileConsideringComments()')]
#[Small]
#[Group('framework')]
#[Group('framework/assertions')]
final class assertXmlStringNotEqualsXmlFileConsideringCommentsTest extends TestCase


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;

use PHPUnit\Framework\Attributes\CoversMethod;
use PHPUnit\Framework\Attributes\DataProviderExternal;
use PHPUnit\Framework\Attributes\Group;
use PHPUnit\Framework\Attributes\Small;
use PHPUnit\Framework\Attributes\TestDox;

#[CoversMethod(Assert::class,

lStringConsideringCommentsTest extends TestCase
{
    #[DataProviderExternal(assertXmlStringEqualsXmlStringConsideringCommentsTest::class, 'failureProvider')]
    public function testSucceedsWhenConstraintEvaluatesToTrue(string $expectedXml, string $actual

 'assertXmlStringNotEqualsXmlStringConsideringComments')]
#[TestDox('assertXmlStringNotEqualsXmlStringConsideringComments()')]
#[Small]
#[Group('framework')]
#[Group('framework/assertions')]
final class assertXmlStringNotEqualsXm


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

use PHPUnit\Framework\Attributes\CoversMethod;
use PHPUnit\Framework\Attributes\Group;
use PHPUnit\Framework\Attributes\Small;
use PHPUnit\Framework\Attributes\TestDox;

#[CoversMethod(Assert::class, 'assertStringEndsNotWith')]
#

id
    {
        $this->assertStringEndsNotWith('suffix', 'foo');
    }

    public function testFailsWhenConstraintEvaluatesToFalse(): void
    {
        $this->expectException(AssertionFailedError::class);

        $this->assertStringEndsNotWith('suffix'

[TestDox('assertStringEndsNotWith()')]
#[Small]
#[Group('framework')]
#[Group('framework/assertions')]
final class assertStringEndsNotWithTest extends TestCase
{
    public function testSucceedsWhenConstraintEvaluatesToTrue(): vo


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;

use PHPUnit\Framework\Attributes\CoversMethod;
use PHPUnit\Framework\Attributes\DataProviderExternal;
use PHPUnit\Framework\Attributes\Group;
use PHPUnit\Framework\Attributes\Small;
use PHPUnit\Framework\Attributes\TestDox;
use stdClass;

#[CoversMethod(

stanceOfTest::class, 'failureProvider')]
    public function testSucceedsWhenConstraintEvaluatesToTrue(string $expected, mixed $actual): void
    {
        $this->assertNotInstanceOf($expected, $actual);
    }

    #[DataProviderExternal(assertInstanceOfTe

Assert::class, 'assertNotInstanceOf')]
#[TestDox('assertNotInstanceOf()')]
#[Small]
#[Group('framework')]
#[Group('framework/assertions')]
final class assertNotInstanceOfTest extends TestCase
{
    #[DataProviderExternal(assertIn


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;

use PHPUnit\Framework\Attributes\CoversMethod;
use PHPUnit\Framework\Attributes\Group;
use PHPUnit\Framework\Attributes\Small;
use PHPUnit\Framework\Attributes\TestDox;

#[CoversMethod(Assert::class, 'assertXmlFileNotEqualsXmlFile')]
#[TestDox('assertXml

{
        $this->assertXmlFileNotEqualsXmlFile(
            TEST_FILES_PATH . 'foo.xml',
            TEST_FILES_PATH . 'bar.xml',
        );
    }

    public function testFailsWhenConstraintEvaluatesToFalse(): void
    {
        $this->expectException(Ass

FileNotEqualsXmlFile()')]
#[Small]
#[Group('framework')]
#[Group('framework/assertions')]
final class assertXmlFileNotEqualsXmlFileTest extends TestCase
{
    public function testSucceedsWhenConstraintEvaluatesToTrue(): void


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

use PHPUnit\Framework\Attributes\CoversMethod;
use PHPUnit\Framework\Attributes\Group;
use PHPUnit\Framework\Attributes\Small;
use PHPUnit\Framework\Attributes\TestDox;

#[CoversMethod(Assert::class, 'markTestIncomplete')]
#[TestDox('markTestIncomplete()')]
#[Small]
#[Group('framework')]
#[Group('framework/assertions')]
f

    public function testMarksTestAsIncomplete(): void
    {
        $message = 'message';

        $this->expectException(IncompleteTestError::class);
        $this->expectExceptionMessageIs($message);

        $this->markTestIncomplete($message);
    }
}

inal class markTestIncompleteTest extends TestCase
{


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

use PHPUnit\Framework\Attributes\CoversMethod;
use PHPUnit\Framework\Attributes\Group;
use PHPUnit\Framework\Attributes\Small;
use PHPUnit\Framework\Attributes\TestDox;
use stdClass;

#[CoversMethod(Assert::class, 'assertObjectNotHasPr

uatesToTrue(): void
    {
        $object = new stdClass;

        $this->assertObjectNotHasProperty('theProperty', $object);
    }

    public function testFailsWhenConstraintEvaluatesToFalse(): void
    {
        $object              = new stdClass;

operty')]
#[TestDox('assertObjectNotHasProperty()')]
#[Small]
#[Group('framework')]
#[Group('framework/assertions')]
final class assertObjectNotHasPropertyTest extends TestCase
{
    public function testSucceedsWhenConstraintEval


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

use PHPUnit\Framework\Attributes\CoversMethod;
use PHPUnit\Framework\Attributes\Group;
use PHPUnit\Framework\Attributes\Small;
use PHPUnit\Framework\Attributes\TestDox;

#[CoversMethod(Assert::class, 'markTestSkipped')]
#[TestDox('markTestSkipped()')]
#[Small]
#[G

final class markTestSkippedTest extends TestCase
{
    public function testMarksTestAsSkipped(): void
    {
        $message = 'message';

        $this->expectException(SkippedWithMessageException::class);
        $this->expectExceptionMessageIs($message)


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;

use PHPUnit\Framework\Attributes\CoversMethod;
use PHPUnit\Framework\Attributes\DataProvider;
use PHPUnit\Framework\Attributes\Group;
use PHPUnit\Framework\Attributes\Small;
use PHPUnit\Framework\Attributes\TestDox;

#[CoversMethod(Assert::class, 'assert

on-empty-list<array{0: non-empty-string, 1: non-empty-string}>
     */
    public static function successProvider(): array
    {
        return [
            ['<root/>', '<root/>'],
            ['<root/>', '<root></root>'],
            ['<root><!-- comment

XmlStringEqualsXmlString')]
#[TestDox('assertXmlStringEqualsXmlString()')]
#[Small]
#[Group('framework')]
#[Group('framework/assertions')]
final class assertXmlStringEqualsXmlStringTest extends TestCase
{
    /**
     * @return n


 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 stdClass;

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

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

 ArraysAreIdenticalTest extends TestCase
{
    /**
     * @return array<string, array{bool, string, array<mixed>, mixed, bool, bool}>
     */
    public static function provider(): array
    {
        $object = new stdClass;


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\NativeType;
use PHPUnit\Framework\TestCase;
use stdClass;

#[CoversClass(Tr

ray{bool, string, NativeType, mixed}>
     */
    public static function nativeTypeProvider(): array
    {
        return [
            [
                true,
                '',
                NativeType::Int,
                [0, 1, 2],
            ],

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


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\Group;
use PHPUnit\Framework\Attributes\Small;
use PHPUnit\Framework\ExpectationFailedException;
use PHPUnit\Framework\TestCase;
use stdClass;

#[CoversClass(IsFalse::class)]
#[CoversClass(C

(false, returnResult: true));
        $this->assertFalse((new IsFalse)->evaluate(true, returnResult: true));
    }

    public function testCanBeRepresentedAsString(): void
    {
        $this->assertSame('is false', (new IsFalse)->toString());
    }

onstraint::class)]
#[Small]
#[Group('framework')]
#[Group('framework/constraints')]
final class IsFalseTest extends TestCase
{
    public function testCanBeEvaluated(): void
    {
        $this->assertTrue((new IsFalse)->evaluate


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\Group;
use PHPUnit\Framework\Attributes\Small;
use PHPUnit\Framework\ExpectationFailedException;
use PHPUnit\Framework\TestCase;
use stdClass;

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

ue, returnResult: true));
        $this->assertFalse((new IsTrue)->evaluate(false, returnResult: true));
    }

    public function testCanBeRepresentedAsString(): void
    {
        $this->assertSame('is true', (new IsTrue)->toString());
    }

    public

nstraint::class)]
#[Small]
#[Group('framework')]
#[Group('framework/constraints')]
final class IsTrueTest extends TestCase
{
    public function testCanBeEvaluated(): void
    {
        $this->assertTrue((new IsTrue)->evaluate(tr


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

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

#[CoversClass(IsAnything::class)]
#[CoversClass(Constraint:

e, returnResult: true));
    }

    public function testCanBeRepresentedAsString(): void
    {
        $this->assertSame('is anything', (new IsAnything)->toString());
    }

    public function testIsCountable(): void
    {
        $this->assertCount(0, (n

:class)]
#[Small]
#[Group('framework')]
#[Group('framework/constraints')]
final class IsAnythingTest extends TestCase
{
    public function testCanBeEvaluated(): void
    {
        $this->assertTrue((new IsAnything)->evaluate(tru


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

ing, string}>
     */
    public static function provider(): array
    {
        return [
            [
                true,
                '',
                __DIR__,
            ],

            [
                false,
                'Failed assertin

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


g}>
     */
    public static function provider(): array
    {
        return [
            [
                true,
                '',
                __FILE__,
            ],

            [
                false,
                'Failed asserting that fi

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


g}>
     */
    public static function provider(): array
    {
        return [
            [
                true,
                '',
                __FILE__,
            ],

            [
                false,
                'Failed asserting that "/

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


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


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 Exception;
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 PHPUnit\Framework\UnknownClassOrInterfaceExcep

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

tion;
use stdClass;
use Throwable;

#[CoversClass(IsInstanceOf::class)]
#[CoversClass(Constraint::class)]
#[CoversClass(UnknownClassOrInterfaceException::class)]
#[Small]
#[Group('framework')]
#[Group('framework/constraints')]
fi


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\Group;
use PHPUnit\Framework\Attributes\Small;
use PHPUnit\Framework\ExpectationFailedException;
use PHPUnit\Framework\TestCase;
use stdClass;

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

ssertTrue($constraint->evaluate(null, returnResult: true));
        $this->assertFalse($constraint->evaluate(false, returnResult: true));
    }

    public function testCanBeRepresentedAsString(): void
    {
        $this->assertSame('is null', (new IsNull

nstraint::class)]
#[Small]
#[Group('framework')]
#[Group('framework/constraints')]
final class IsNullTest extends TestCase
{
    public function testCanBeEvaluated(): void
    {
        $constraint = new IsNull;

        $this->a


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\NativeType;
use PHPUnit\Framework\

list<array{bool, string, NativeType, mixed}>
     */
    public static function provider(): array
    {
        return [
            [
                true,
                '',
                NativeType::Numeric,
                0,
            ],

TestCase;
use stdClass;

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


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

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\ExpectationFailedException;
use PHPUnit\Framework\TestCase;
use stdClass;

#[CoversClass(IsEqualCanonicalizing::class)]
#[CoversClass(Constraint::class)]
#[Small]
#[Group('framework')]
#[Group('framework/cons

n [
            [
                true,
                <<<'EOT'
is equal to Array &%d [
    0 => 'value',
]
EOT,
                '',
                '',
                ['value'],
                ['value'],
            ],

            [
                tr

traints')]
final class IsEqualCanonicalizingTest extends TestCase
{
    /**
     * @return non-empty-list<array{bool, string, string, string, mixed, mixed}>
     */
    public static function provider(): array
    {
        retur


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

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\ExpectationFailedException;
use PHPUnit\Framework\TestCase;
use stdClass;

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

            [
                true,
                <<<'EOT'
is equal to Array &%d [
    0 => 'value',
]
EOT,
                '',
                '',
                ['value'],
                ['VALUE'],
            ],

            [
                true,

aints')]
final class IsEqualIgnoringCaseTest extends TestCase
{
    /**
     * @return non-empty-list<array{bool, string, string, string, mixed, mixed}>
     */
    public static function provider(): array
    {
        return [


 PHPUnit\Framework\Attributes\Group;
use PHPUnit\Framework\Attributes\Small;
use PHPUnit\Framework\ExpectationFailedException;
use PHPUnit\Framework\TestCase;
use PHPUnit\TestFixture\EnumerationEquals\Example;
use PHPUnit\TestFixture\EnumerationEquals\ExampleInt;
use PHPUnit\TestFixture\EnumerationEquals\ExampleString;
use stdClass;

#[CoversClass(IsEqual::class)]
#[CoversClass(Constraint::class)]
#[Small]
#[Group('framework')]
#[Group('framework/constraints')]
final class IsEqualTest extends TestCase
{

al to Array &%d [
    0 => 'value',
]
EOT,
                '',
                '',
                ['value'],
                ['value'],
            ],

            [
                true,
                <<<'EOT'
is equal to stdClass Object #%d (
    'foo

 /**
     * @return non-empty-list<array{bool, string, string, string, mixed, mixed}>
     */
    public static function provider(): array
    {
        return [
            [
                true,
                <<<'EOT'
is equ


 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 stdClass;

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

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


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

use ArrayIterator;
use ArrayObject;
use EmptyIterator;
use Generator;
use IteratorAggregate;
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\Framework\GeneratorNotSupportedException;
use PHPUnit\Framewo

atorAggregate2;
use Traversable;

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

rk\TestCase;
use PHPUnit\TestFixture\ExceptionThrowingIteratorAggregate;
use PHPUnit\TestFixture\TestIterator;
use PHPUnit\TestFixture\TestIterator2;
use PHPUnit\TestFixture\TestIteratorAggregate;
use PHPUnit\TestFixture\TestIter


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

            [
                false,
                'Fail

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


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 ArrayIterator;
use ArrayObject;
use EmptyIterator;
use PHPUnit\Framework\Attributes\CoversClass;
use PHPUnit\Framework\Attributes\DataProvider;
use PHPUnit\Framework\Attributes\Group;
use PHPUnit\Framework\Attributes\Small;
use PHPUnit\Framework\ExpectationFailedEx

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

            [
                true,

ception;
use PHPUnit\Framework\TestCase;

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


xed}>
     */
    public static function provider(): array
    {
        return [
            [
                true,
                '',
                1,
                0,
            ],

            [
                false,
                'Failed ass

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


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\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;

#[CoversClass(SameSiz

ng(): void
    {
        $this->assertSame('count matches 0', new SameSize([])->toString());
    }

    public function testCanBeNegated(): void
    {
        $constraint = new LogicalNot(new SameSize([1]));

        $this->assertSame('count does not match

e::class)]
#[CoversClass(Count::class)]
#[CoversClass(Constraint::class)]
#[Small]
#[Group('framework')]
#[Group('framework/constraints')]
final class SameSizeTest extends TestCase
{
    public function testCanBeRepresentedAsStri


bjectTest extends TestDoubleTestCase
{
    public function testExpectationThatMethodIsNeverCalledSucceedsWhenMethodIsNotCalled(): void
    {
        $double = $this->createMock(AnInterface::class);

        $double->expects($this->never())->method('doSomething');
    }

    public function testExpectationThatMethodIsNeverCalledFailsWhenMethodIsCalled(): void
    {
        $double = $this->createMock(AnInterface::class);

        $double->expects($this->never())->method('doSomething');

        $this->assert

rmAssertions]
    #[IgnorePhpunitDeprecations]
    public function testExpectationThatMethodIsCalledZeroOrMoreTimesSucceedsWhenMethodIsNotCalled(): void
    {
        $double = $this->createMock(AnInterface::class);

        $double->expects($this->any())-

ThatMockObjectExpectationFails(
            AnInterface::class . '::doSomething(): bool was not expected to be called, actually called 1 time.',
            $double,
            'doSomething',
        );
    }

    #[DoesNotPerfo


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

use function sprintf;
use Generator;
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\TestCase;
use PHPUnit\TestFixture\MockObject\AnInterface;
use PHPUnit\TestFixture\MockObject\AnInterfaceForIssue5593;
use PHPUnit\TestFixture\MockOb

xture\MockObject\InterfaceWithMethodThatReturnsStatic;
use PHPUnit\TestFixture\MockObject\YetAnotherInterface;
use stdClass;

#[CoversClass(ReturnValueGenerator::class)]
#[Group('test-doubles')]
#[Group('test-doubles/test-stub')]
#[Small]
final class Retur

ject\AnotherInterface;
use PHPUnit\TestFixture\MockObject\AnotherInterfaceForIssue5593;
use PHPUnit\TestFixture\MockObject\ExtendableClass;
use PHPUnit\TestFixture\MockObject\InterfaceWithMethodThatReturnsSelf;
use PHPUnit\TestFi


ork\ExpectationFailedException;
use PHPUnit\Framework\MockObject\Generator\MethodNamedMethodException;
use PHPUnit\Framework\MockObject\Runtime\PropertyHook;
use PHPUnit\Framework\TestCase;
use PHPUnit\TestFixture\MockObject\ExtendableClassCallingMethodInDestructor;
use PHPUnit\TestFixture\MockObject\ExtendableClassWithCloneMethod;
use PHPUnit\TestFixture\MockObject\ExtendableClassWithPropertyWithGetHook;
use PHPUnit\TestFixture\MockObject\ExtendableClassWithPropertyWithSetHook;
use PHPUnit\TestFixture\Mock

Object\ExtendableClassWithVirtualPropertyWithGetHook;
use PHPUnit\TestFixture\MockObject\ExtendableReadonlyClassWithCloneMethod;
use PHPUnit\TestFixture\MockObject\InterfaceWithMethodNamedMethod;
use PHPUnit\TestFixture\MockObjec


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\Generator;

use Iterator;
use PHPUnit\Framework\Attributes\CoversClass;
use PHPUnit\Framework\Attributes\Group;
use PHPUnit\Framework\Attributes\Small;
use PHPUnit\Framework\MockObject\Stub;
use PHPUnit\Framework\TestCase;
use PHPUnit\TestFixture\MockObject\ExtendableCla

[CoversClass(Generator::class)]
#[Group('test-doubles')]
#[Small]
final class GeneratorTest extends TestCase
{
    public function testReplacesTraversableWithIterator(): void
    {
        $double = (new Generator)->testDouble(Traversable::class, false);

ss;
use PHPUnit\TestFixture\MockObject\ExtendableClassWithConstructorArguments;
use PHPUnit\TestFixture\MockObject\InterfaceExtendingThrowable;
use PHPUnit\TestFixture\MockObject\InterfaceExtendingTraversable;
use Traversable;

#


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\Generator;

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

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

alse, Type::fromName('string', false));

        $this->assertSame($name, $property->name());
    }

    public function testHasType(): void
    {
        $type = Type::fromName('string', false);

        $property = new HookedProperty('property-name', $ty

all]
final class HookedPropertyTest extends TestCase
{
    public function testHasName(): void
    {
        $name = 'property-name';

        $property = new HookedProperty($name, Type::fromName('string', false), false, false, f


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\Group;
use PHPUnit\Framework\Attributes\Medium;
use PHPUnit\Framework\Attributes\TestDox;
use PHPUnit\Framework\TestCase;
use PHPUnit\TestFixture\MockObject\InterfaceWithReturnTypeDeclaration

atesMockObjectForInterfaceOrExtendableClassWithReturnValueConfigurationForMultipleMethods(): void
    {
        $double = $this->createConfiguredMock(
            InterfaceWithReturnTypeDeclaration::class,
            [
                'doSomething'     =>

;

#[Group('test-doubles')]
#[Group('test-doubles/creation')]
#[Group('test-doubles/mock-object')]
#[Medium]
#[TestDox('createConfiguredMock()')]
final class CreateConfiguredMockTest extends TestCase
{
    public function testCre


esTestStubForInterfaceOrExtendableClassWithReturnValueConfigurationForMultipleMethods(): void
    {
        $double = $this->createConfiguredStub(
            InterfaceWithReturnTypeDeclaration::class,
            [
                'doSomething'     => tru

;

#[Group('test-doubles')]
#[Group('test-doubles/creation')]
#[Group('test-doubles/test-stub')]
#[Medium]
#[TestDox('createConfiguredStub()')]
final class CreateConfiguredStubTest extends TestCase
{
    public function testCreat


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\RuntimeException as GeneratorRuntimeException;
use PHPUnit\Framework\MockObject\Generator\UnknownInterf

st-doubles')]
#[Group('test-doubles/creation')]
#[Group('test-doubles/mock-object')]
#[Medium]
#[TestDox('createMockForIntersectionOfInterfaces()')]
final class CreateMockForIntersectionOfInterfacesTest extends TestCase
{
    public function testCreatesMoc

aceException;
use PHPUnit\Framework\TestCase;
use PHPUnit\TestFixture\MockObject\AnInterface;
use PHPUnit\TestFixture\MockObject\AnotherInterface;
use PHPUnit\TestFixture\MockObject\AnotherInterfaceThatDoesSomething;

#[Group('te


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\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\TestCase

ckForIntersectionOfInterfaces()')]
#[DisableReturnValueGenerationForTestDoubles]
final class CreateMockForIntersectionOfInterfacesWithDisabledReturnValueGenerationTest extends TestCase
{
    public function testReturnValueGenerationCanBeDisabledWithAttribu

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

#[Group('test-doubles')]
#[Group('test-doubles/creation')]
#[Group('test-doubles/mock-object')]
#[Medium]
#[TestDox('createMo


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\ClassIsAnonymousException;
use PHPUnit\Framework\MockObject\Generator\ClassIsEnumerationException;
use PHPUnit\Framework\MockObject\Generator\ClassIsFinal

MockObject\Generator\UnknownTypeException;
use PHPUnit\Framework\TestCase;
use PHPUnit\TestFixture\MockObject\AnInterface;
use PHPUnit\TestFixture\MockObject\Enumeration;
use PHPUnit\TestFixture\MockObject\ExtendableClass;
use PHPUnit\TestFixture\MockObjec

Exception;
use PHPUnit\Framework\MockObject\Generator\Generator;
use PHPUnit\Framework\MockObject\Generator\InvalidMethodNameException;
use PHPUnit\Framework\MockObject\Generator\MethodNamedMethodException;
use PHPUnit\Framework\


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

tDoubles]
final class CreateMockWithDisabledReturnValueGenerationTest extends TestCase
{
    public function testReturnValueGenerationCanBeDisabledWithAttribute(): void
    {
        $double = $this->createMock(AnInterface::class);

        $this->expectEx

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

#[Group('test-doubles')]
#[Group('test-doubles/creation')]
#[Group('test-doubles/mock-object')]
#[Medium]
#[TestDox('createMock()')]
#[DisableReturnValueGenerationForTes


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\DuplicateMethodException;
use PHPUnit\Framework\TestCase;
use PHPUnit\TestFixture\MockObject\Extendable

public function testCreatesPartialMockObjectForExtendableClass(): void
    {
        $double = $this->createPartialMock(ExtendableClass::class, ['doSomethingElse']);

        $double->expects($this->once())->method('doSomethingElse')->willReturn(true);

Class;
use ReflectionProperty;

#[Group('test-doubles')]
#[Group('test-doubles/creation')]
#[Group('test-doubles/mock-object')]
#[Medium]
#[TestDox('createPartialMock()')]
final class CreatePartialMockTest extends TestCase
{


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

onForTestDoubles]
final class CreatePartialMockWithDisabledReturnValueGenerationTest extends TestCase
{
    public function testReturnValueGenerationCanBeDisabledWithAttribute(): void
    {
        $double = $this->createPartialMock(ExtendableClass::class,

stCase;
use PHPUnit\TestFixture\MockObject\ExtendableClass;

#[Group('test-doubles')]
#[Group('test-doubles/creation')]
#[Group('test-doubles/mock-object')]
#[Medium]
#[TestDox('createPartialMock()')]
#[DisableReturnValueGenerati


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;

#[CoversClass(Constraint::class)]
#[CoversClass(UnaryOperator::class)]
#[CoversClass(LogicalNot::class)]
#[Smal

        $this->assertSame(42, $constraint(42));
    }

    public function testInvokeThrowsWhenConstraintIsNotMet(): void
    {
        $constraint = new IsIdentical(42);

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

        $const

l]
#[Group('framework')]
#[Group('framework/constraints')]
final class ConstraintTest extends TestCase
{
    public function testInvokeReturnsActualValueWhenConstraintIsMet(): void
    {
        $constraint = new IsIdentical(42);


 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;

#[CoversClass(IsIdentical::class)]
#[CoversClass(Constraint::class)]
#[Small]
#[Group('framework')]
#[Group('fr

            [
                'is identical to 0',
                'Failed asserting that 1 is identical to 0.',
                '',
                0,
                1,
            ],

            [
                'is identical to an object of class "st

amework/constraints')]
final class IsIdenticalTest extends TestCase
{
    /**
     * @return non-empty-list<array{string, string, string, mixed, mixed}>
     */
    public static function provider(): array
    {
        return [


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 json_encode;
use function str_repeat;
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

*/
    public static function provider(): array
    {
        return [
            [
                true,
                '',
                json_encode(['key' => 'value']),
            ],

            [
                false,
                'Failed ass

(IsJson::class)]
#[CoversClass(Constraint::class)]
#[Small]
#[Group('framework')]
#[Group('framework/constraints')]
final class IsJsonTest 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 function str_repeat;
use PHPUnit\Framework\Attributes\CoversClass;
use PHPUnit\Framework\Attributes\DataProvider;
use PHPUnit\Framework\Attributes\Group;
use PHPUnit\Framework\Attributes\Small;
use PHPUnit\Framework\Exception as FrameworkException;
use PHPUnit\Framework\ExpectationFailedException;
use PHPUnit\Frame

rn non-empty-list<array{bool, string, string, string}>
     */
    public static function provider(): array
    {
        return [
            [
                true,
                '',
                '/.*/',
                'string',
            ],

work\TestCase;

#[CoversClass(RegularExpression::class)]
#[CoversClass(Constraint::class)]
#[Small]
#[Group('framework')]
#[Group('framework/constraints')]
final class RegularExpressionTest extends TestCase
{
    /**
     * @retu


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(StringEqualsStringIgnoringLineEndings::class)]
#[C

ring, string}>
     */
    public static function provider(): array
    {
        return [
            [
                true,
                '',
                "string\r",
                "string\r\n",
            ],

            [
                false

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


scriptionTest extends TestCase
{
    public function testConstraintStringMatchesDirectorySeparator(): void
    {
        $constraint = new StringMatchesFormatDescription('*%e*');

        $this->assertFalse($constraint->evaluate('**', '', true));
        $this->assertFalse($constraint->evaluate('*a*', '', true));

        $this->assertTrue($constraint->evaluate('*' . DIRECTORY_SEPARATOR . '*', '', true));
    }

    public function testConstraintStringMatchesString(): void
    {
        $constraint = new St

, '', true));
        $this->assertTrue($constraint->evaluate('*foo 123 bar*', '', true));
    }

    public function testConstraintStringMatchesOptionalString(): void
    {
        $constraint = new StringMatchesFormatDescription('*%S*');

        $this->

ringMatchesFormatDescription('*%s*');

        $this->assertFalse($constraint->evaluate('**', '', true));
        $this->assertFalse($constraint->evaluate("*\n*", '', true));

        $this->assertTrue($constraint->evaluate('***'


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

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

            [

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