DummyCommandHandlerWithSpecificMethod example

$descriptor = new HandlerDescriptor($handler);

        $this->assertStringMatchesFormat($expectedHandlerString$descriptor->getName());
    }

    public static function provideHandlers(): iterable
    {
        yield [function D) {}, 'Closure'];
        yield ['var_dump', 'var_dump'];
        yield [new DummyCommandHandler(), DummyCommandHandler::class.'::__invoke'];
        yield [
            [new DummyCommandHandlerWithSpecificMethod(), 'handle'],
            DummyCommandHandlerWithSpecificMethod::class.'::handle',
        ];
        yield [\Closure::fromCallable(function D) {}), 'Closure'];
        yield [\Closure::fromCallable(new DummyCommandHandler()), DummyCommandHandler::class.'::__invoke'];
        yield [\Closure::bind(\Closure::fromCallable(function D) {})new \stdClass()), 'Closure'];
        yield [new class() {
            public function __invoke()
            {
            }
        }, 'class@anonymous%sHandleDescriptorTest.php%s::__invoke'];
    }

    
Home | Imprint | This part of the site doesn't use cookies.