@@ -51,4 +51,74 @@ public function testShouldReturnStringForPlainTextDocumentArray(): void
5151 $ sss = Utils::jsonArrayToHtml ([$ jsonObject ], new Option ());
5252 $ this ->assertEquals ([PlainTextHtml], $ sss );
5353 }
54+
55+ public function testShouldReturnEmptyStringOnAssetReference (): void
56+ {
57+ $ jsonObject = json_decode (AssetReferenceJson);
58+ $ sss = Utils::jsonToHtml ($ jsonObject , new Option ());
59+ $ this ->assertEquals ('' , $ sss );
60+ }
61+
62+ public function testShouldReturnEmptyStringOnArrayAssetReference (): void
63+ {
64+ $ jsonObject = json_decode (AssetReferenceJson);
65+ $ sss = Utils::jsonArrayToHtml ([$ jsonObject ], new Option ());
66+ $ this ->assertEquals (['' ], $ sss );
67+ }
68+
69+ public function testShouldReturnEmbeddedAssetOnAssetReference (): void
70+ {
71+ $ jsonObject = json_decode (AssetReferenceJson);
72+ $ sss = Utils::jsonToHtml ($ jsonObject , new Option (EmbedObjectMock::embeddedModel ('' , '' , 'blt44asset ' )));
73+ $ this ->assertEquals (AssetReferenceHtml, $ sss );
74+ }
75+
76+ public function testShouldReturnEmbeddedAssetOnArrayAssetReference (): void
77+ {
78+ $ jsonObject = json_decode (AssetReferenceJson);
79+ $ sss = Utils::jsonArrayToHtml ([$ jsonObject ], new Option (EmbedObjectMock::embeddedModel ('' , '' , 'blt44asset ' )));
80+ $ this ->assertEquals ([AssetReferenceHtml], $ sss );
81+ }
82+
83+ public function testShouldReturnEmbeddedEntryOnEntryBlockReference (): void
84+ {
85+ $ jsonObject = json_decode (EntryReferenceBlockJson);
86+ $ sss = Utils::jsonToHtml ($ jsonObject , new Option (EmbedObjectMock::embeddedModel ('' , 'blttitleuid ' , 'blt44asset ' )));
87+ $ this ->assertEquals (EntryReferenceBlockHtml, $ sss );
88+ }
89+
90+ public function testShouldReturnEmbeddedEntryOnArrayEntryBlockReference (): void
91+ {
92+ $ jsonObject = json_decode (EntryReferenceBlockJson);
93+ $ sss = Utils::jsonArrayToHtml ([$ jsonObject ], new Option (EmbedObjectMock::embeddedModel ('' , 'blttitleuid ' , 'blt44asset ' )));
94+ $ this ->assertEquals ([EntryReferenceBlockHtml], $ sss );
95+ }
96+
97+ public function testShouldReturnEmbeddedEntryOnEntryLinkReference (): void
98+ {
99+ $ jsonObject = json_decode (EntryReferenceLinkJson);
100+ $ sss = Utils::jsonToHtml ($ jsonObject , new Option (EmbedObjectMock::embeddedModel ('' , 'bltemmbedEntryuid ' , 'blt44asset ' )));
101+ $ this ->assertEquals (EntryReferenceLinkHtml, $ sss );
102+ }
103+
104+ public function testShouldReturnEmbeddedEntryOnArrayEntryLinkReference (): void
105+ {
106+ $ jsonObject = json_decode (EntryReferenceLinkJson);
107+ $ sss = Utils::jsonArrayToHtml ([$ jsonObject ], new Option (EmbedObjectMock::embeddedModel ('' , 'bltemmbedEntryuid ' , 'blt44asset ' )));
108+ $ this ->assertEquals ([EntryReferenceLinkHtml], $ sss );
109+ }
110+
111+ public function testShouldReturnEmbeddedEntryOnEntryInlineReference (): void
112+ {
113+ $ jsonObject = json_decode (EntryReferenceInlineJson);
114+ $ sss = Utils::jsonToHtml ($ jsonObject , new Option (EmbedObjectMock::embeddedModel ('' , 'blttitleUpdateuid ' , 'blt44asset ' )));
115+ $ this ->assertEquals (EntryReferenceInlineHtml, $ sss );
116+ }
117+
118+ public function testShouldReturnEmbeddedEntryOnArrayEntryInlineReference (): void
119+ {
120+ $ jsonObject = json_decode (EntryReferenceInlineJson);
121+ $ sss = Utils::jsonArrayToHtml ([$ jsonObject ], new Option (EmbedObjectMock::embeddedModel ('' , 'blttitleUpdateuid ' , 'blt44asset ' )));
122+ $ this ->assertEquals ([EntryReferenceInlineHtml], $ sss );
123+ }
54124}
0 commit comments