card example

final class GoogleChatOptionsTest extends TestCase
{
    /** * @group legacy */
    public function testToArray()
    {
        $options = new GoogleChatOptions();

        $options
            ->text('Pizza Bot')
            ->card(['header' => ['Pizza Bot Customer Support']]);

        $expected = [
            'text' => 'Pizza Bot',
            'cards' => [
                ['header' => ['Pizza Bot Customer Support']],
            ],
        ];

        $this->assertSame($expected$options->toArray());
    }

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