Add api/v4/formatExamples/stylized.php
authorTim Otten <totten@civicrm.org>
Thu, 28 Nov 2019 02:08:44 +0000 (18:08 -0800)
committerCiviCRM <info@civicrm.org>
Wed, 16 Sep 2020 02:13:20 +0000 (19:13 -0700)
ext/afform/mock/tests/phpunit/api/v4/formatExamples/stylized.php [new file with mode: 0644]

diff --git a/ext/afform/mock/tests/phpunit/api/v4/formatExamples/stylized.php b/ext/afform/mock/tests/phpunit/api/v4/formatExamples/stylized.php
new file mode 100644 (file)
index 0000000..f99f6ba
--- /dev/null
@@ -0,0 +1,22 @@
+<?php
+
+return [
+  'html' => '<p><strong>Stylized</strong> text is <em>wonky</em> text!</p>',
+  'pretty' => "<p><strong>Stylized</strong> text is <em>wonky</em> text!</p>\n",
+  'shallow' => [
+    ['#tag' => 'p', '#children' => [
+      ['#tag' => 'strong', '#children' => [['#text' => 'Stylized']]],
+      ['#text' => ' text is '],
+      ['#tag' => 'em', '#children' => [['#text' => 'wonky']]],
+      ['#text' => ' text!'],
+    ]],
+  ],
+  'deep' => [
+    ['#tag' => 'p', '#children' => [
+      ['#tag' => 'strong', '#children' => [['#text' => 'Stylized']]],
+      ['#text' => ' text is '],
+      ['#tag' => 'em', '#children' => [['#text' => 'wonky']]],
+      ['#text' => ' text!'],
+    ]],
+  ],
+];