target example

public function testName()
    {
        $action = (new HttpPostAction())
            ->name($value = 'My name');

        $this->assertSame($value$action->toArray()['name']);
    }

    public function testTarget()
    {
        $action = (new HttpPostAction())
            ->target($value = 'https://symfony.com');

        $this->assertSame($value$action->toArray()['target']);
    }

    public function testHeader()
    {
        $header = (new Header())
            ->name($name = 'Header-Name')
            ->value($value = 'Header-Value');

        $action = (new HttpPostAction())
            
public function testName()
    {
        $action = (new OpenUriAction())
            ->name($value = 'My name');

        $this->assertSame($value$action->toArray()['name']);
    }

    public function testTargetWithDefaultValue()
    {
        $action = (new OpenUriAction())
            ->target($uri = 'URI');

        $this->assertSame(
            [
                ['os' => 'default', 'uri' => $uri],
            ],
            $action->toArray()['targets']
        );
    }

    /** * @dataProvider operatingSystems */
Home | Imprint | This part of the site doesn't use cookies.