7 * Unit tests for the basic typogrify functionality.
9 class TypogrifySmartyPantsTestCase extends DrupalWebTestCase {
11 * Implements getInfo().
15 'name' => t('Typogrify with SmartyPants'),
16 'description' => t('Test the application of the full package of Typogrify and SmartyPants.'),
17 'group' => t('Typogrify'),
25 parent::setUp('typogrify');
27 $filter = (object) array(
29 'smartypants_enabled' => 1,
30 'smartypants_hyphens' => 2,
31 'wrap_ampersand' => 1,
32 'widont_enabled' => 1,
35 'wrap_initial_quotes' => 1,
38 'ligatures' => array(),
47 * Original example compatibility-test.
49 function testOriginalTypogrifyExample() {
52 <h2>"Jayhawks" & KU fans act extremely obnoxiously</h2>
53 <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>
56 <h2>“Jayhawks” <span class="amp">&</span> <span class="caps">KU</span> fans act extremely obnoxiously</h2>
57 <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>
61 $result = _typogrify_process($before, $filter, NULL, 'en', NULL, NULL);
62 $this->assertEqual($result, $after, t('Original Typogrify example.'));