From d94c5bfaf5a12fb736a409fc6e65a1a4eb192622 Mon Sep 17 00:00:00 2001 From: Bas van Dinther Date: Mon, 9 Oct 2023 09:27:31 +0200 Subject: [PATCH] Add test --- tests/MjmlTest.php | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/tests/MjmlTest.php b/tests/MjmlTest.php index 483740b..be6cd83 100644 --- a/tests/MjmlTest.php +++ b/tests/MjmlTest.php @@ -100,6 +100,14 @@ Mjml::new()->sidecar()->toHtml(mjmlSnippet()); })->throws(SidecarPackageUnavailable::class); +it('can determine if the given mjml can be converted when the mjml is deprecated', function (string $mjml, bool $expectedResult) { + expect(Mjml::new()->canConvert($mjml))->toBe($expectedResult); +})->with([ + ['', true], + ['', false], // deprecated mjml + ['', true], +]); + function mjmlSnippet(): string { return <<<'MJML'