function TypogrifySmartyPantsTestCase::testOriginalTypogrifyExample in Typogrify 6
Same name and namespace in other branches
- 7 tests/typogrify-smartypants.test \TypogrifySmartyPantsTestCase::testOriginalTypogrifyExample()
File
- tests/
typogrify-smartypants.test, line 30 - typogrify.class.test Unit tests for the basic typogrify functionality.
Class
- TypogrifySmartyPantsTestCase
- @file typogrify.class.test Unit tests for the basic typogrify functionality.
Code
function testOriginalTypogrifyExample() {
$before = <<<HTML
<h2>"Jayhawks" & KU fans act extremely obnoxiously</h2>
<p>By J.D. Salinger, Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. "Excepteur sint occaecat 'cupidatat' non proident" sunt RFID22 in.... </p>
HTML;
$after = <<<HTML
<h2><span class="dquo">“</span>Jayhawks” <span class="amp">&</span> <span class="caps">KU</span> fans act extremely obnoxiously</h2>
<p>By <span class="caps">J.D.</span> Salinger, Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. “Excepteur sint occaecat ‘cupidatat’ non proident” sunt <span class="caps">RFID22</span> in…. </p>
HTML;
$result = _typogrify_process($before, 'test');
$this
->assertEqual($result, $after, t('Original Typogrify example.'));
}