markdown example

namespace Symfony\Bridge\Twig\Tests\Mime;

use PHPUnit\Framework\TestCase;
use Symfony\Bridge\Twig\Mime\NotificationEmail;

class NotificationEmailTest extends TestCase
{
    public function test()
    {
        $email = (new NotificationEmail())
            ->markdown('Foo')
            ->exception(new \Exception())
            ->importance(NotificationEmail::IMPORTANCE_HIGH)
            ->action('Bar', 'http://example.com/')
            ->context(['a' => 'b'])
        ;

        $this->assertEquals([
            'importance' => NotificationEmail::IMPORTANCE_HIGH,
            'content' => 'Foo',
            'exception' => true,
            'action_text' => 'Bar',
            
$this->assertSame(
            [
                ['name' => $name, 'value' => $value],
            ],
            $section->toArray()['facts']
        );
    }

    public function testMarkdownWithTrue()
    {
        $action = (new Section())
            ->markdown(true);

        $this->assertTrue($action->toArray()['markdown']);
    }

    public function testMarkdownWithFalse()
    {
        $action = (new Section())
            ->markdown(false);

        $this->assertFalse($action->toArray()['markdown']);
    }
}
Home | Imprint | This part of the site doesn't use cookies.