<commit_before><?php declare(strict_types=1);
/*
 * This file is part of PHPUnit.
 *
 * (c) <NAME> <<EMAIL>>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */
namespace PHPUnit\Event\Test;

use PHPUnit\Framework\TestCase;

/**
 * @covers \PHPUnit\Event\Test\AfterTest
 */
final class AfterTestTest extends TestCase
{
    public function testConstructorSetsValues(): void
    {
        $test = new Test();

        $result = $this->createMock(Result::class);

        $event = new AfterTest(
            $test,
            $result
        );

        $this->assertSame($test, $event->test());
        $this->assertSame($result, $event->result());
    }
}<commit_msg>Fix: Use anonymous class as test double<commit_after><?php declare(strict_types=1);
/*
 * This file is part of PHPUnit.
 *
 * (c) <NAME> <<EMAIL>>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */
namespace PHPUnit\Event\Test;

use PHPUnit\Framework\TestCase;

/**
 * @covers \PHPUnit\Event\Test\AfterTest
 */
final class AfterTestTest extends TestCase
{
    public function testConstructorSetsValues(): void
    {
        $test = new Test();

        $result = new class implements Result {
            public function is(Result $other): bool
            {
                return false;
            }

            public function asString(): string
            {
                return get_class($this);
            }
        };

        $event = new AfterTest(
            $test,
            $result
        );

        $this->assertSame($test, $event->test());
        $this->assertSame($result, $event->result());
    }
}
{'fraction_non_alphanumeric': 0.12400455062571103, 'fraction_numerical': 0.0011376564277588168, 'mean_word_length': 2.325141776937618, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 18, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5382062', 'n_tokens_mistral': 488, 'n_tokens_neox': 479, 'n_words': 140}