Action example

/** @var \DOMElement $meta */
        $meta = $action->getElementsByTagName('meta')->item(0);

        $meta = Metadata::fromXml($meta);

        $parameter = new Parameter(['id' => 'key']);
        $this->parameters = new Parameters([$parameter]);
        $this->headers = new Headers([$parameter]);
        $inputFiled = new InputField(['id' => 'key']);
        $this->config = new Config([$inputFiled]);

        $this->action = new Action([
            'meta' => $meta,
            'headers' => $this->headers,
            'parameters' => $this->parameters,
            'config' => $this->config,
        ]);
    }

    public function testToArray(): void
    {
        $result = $this->action->toArray('en-GB');
        static::assertArrayHasKey('name', $result);
        
Home | Imprint | This part of the site doesn't use cookies.