@@ -269,6 +269,47 @@ class GlossifyBaseTest extends UnitTestCase {
'urlpattern'=>'/random/testpattern',
'output'=>'<p>Simple HTML with<b> <a href="/random/testpattern" title="'.$term->tip.'">RT</a></b> and rt as replacement term</p>',
],
// Glossify-exclude class prevents term to be "glossified"
'set18'=>[
'text'=>'Simple plain text with <span class="glossify-exclude">RT</span> as replacement term that is excluded from glossify',
'terms'=>[$term->name_norm=>$term],
'case_sensitivity'=>TRUE,
'first_only'=>FALSE,
'displaytype'=>'tooltips',
'tooltip_truncate'=>FALSE,
'urlpattern'=>'',
'output'=>'Simple plain text with <span class="glossify-exclude">RT</span> as replacement term that is excluded from glossify',
],
'set19'=>[
'text'=>'<p class="glossify-exclude">Simple plain text with RT as replacement term that is excluded from glossify.</p>',
'terms'=>[$term->name_norm=>$term],
'case_sensitivity'=>TRUE,
'first_only'=>FALSE,
'displaytype'=>'tooltips',
'tooltip_truncate'=>FALSE,
'urlpattern'=>'',
'output'=>'<p class="glossify-exclude">Simple plain text with RT as replacement term that is excluded from glossify.</p>',
],
'set20'=>[
'text'=>'Simple plain text with wrapped by an element containing not only glossify-exclude class <span class="foo glossify-exclude bar">RT</span> as replacement term that is excluded from glossify.',
'terms'=>[$term->name_norm=>$term],
'case_sensitivity'=>TRUE,
'first_only'=>FALSE,
'displaytype'=>'tooltips',
'tooltip_truncate'=>FALSE,
'urlpattern'=>'',
'output'=>'Simple plain text with wrapped by an element containing not only glossify-exclude class <span class="foo glossify-exclude bar">RT</span> as replacement term that is excluded from glossify.',
],
'set21'=>[
'text'=>'<div class="glossify-exclude"><p>Nested HTML block with text with <span>RT</span> as replacement term that is excluded from glossify.</p></div>',
'terms'=>[$term->name_norm=>$term],
'case_sensitivity'=>TRUE,
'first_only'=>FALSE,
'displaytype'=>'tooltips',
'tooltip_truncate'=>FALSE,
'urlpattern'=>'',
'output'=>'<div class="glossify-exclude"><p>Nested HTML block with text with <span>RT</span> as replacement term that is excluded from glossify.</p></div>',