GoogleChatOptions example

use PHPUnit\Framework\TestCase;
use Symfony\Component\Notifier\Bridge\GoogleChat\GoogleChatOptions;

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']],
            ],
        ];

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