subtitle example

yield [[['@type' => 'ActionCard']]new ActionCard()];
        yield [[['@type' => 'HttpPOST']]new HttpPostAction()];
        yield [[['@type' => 'InvokeAddInCommand']]new InvokeAddInCommandAction()];
        yield [[['@type' => 'OpenUri']]new OpenUriAction()];
    }

    public function testActivity()
    {
        $activity = (new Activity())
            ->image($imageUrl = 'https://symfony.com/logo.png')
            ->title($title = 'Activities')
            ->subtitle($subtitle = 'for Admins only')
            ->text($text = 'Hey Symfony!');

        $section = (new Section())
            ->activity($activity);

        $this->assertSame(
            [
                'activityImage' => $imageUrl,
                'activityTitle' => $title,
                'activitySubtitle' => $subtitle,
                'activityText' => $text,
            ],
public function testTitle()
    {
        $field = (new Activity())
            ->title($value = 'Symfony is great!');

        $this->assertSame($value$field->toArray()['activityTitle']);
    }

    public function testSubtitle()
    {
        $field = (new Activity())
            ->subtitle($value = 'I am a subtitle!');

        $this->assertSame($value$field->toArray()['activitySubtitle']);
    }

    public function testText()
    {
        $field = (new Activity())
            ->text($value = 'Text goes here');

        $this->assertSame($value$field->toArray()['activityText']);
    }
}
Home | Imprint | This part of the site doesn't use cookies.