Make WordPress Core

Changeset 26488


Ignore:
Timestamp:
12/01/2013 12:14:45 AM (11 years ago)
Author:
SergeyBiryukov
Message:

Update unit tests for convert_smilies(). see #25529.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/phpunit/tests/formatting/Smilies.php

    r26191 r26488  
    1717            array (
    1818                'Lorem ipsum dolor sit amet mauris ;-) Praesent gravida sodales. :lol: Vivamus nec diam in faucibus eu, bibendum varius nec, imperdiet purus est, at augue at lacus malesuada elit dapibus a, :eek: mauris. Cras mauris viverra elit. Nam laoreet viverra. Pellentesque tortor. Nam libero ante, porta urna ut turpis. Nullam wisi magna, :mrgreen: tincidunt nec, sagittis non, fringilla enim. Nam consectetuer nec, ullamcorper pede eu dui odio consequat vel, vehicula tortor quis pede turpis cursus quis, egestas ipsum ultricies ut, eleifend velit. Mauris vestibulum iaculis. Sed in nunc. Vivamus elit porttitor egestas. Mauris purus :?:',
    19                 'Lorem ipsum dolor sit amet mauris <img src=\'' . $includes_path . 'icon_wink.gif\' alt=\';-)\' class=\'wp-smiley\' />  Praesent gravida sodales. <img src=\'' . $includes_path . 'icon_lol.gif\' alt=\':lol:\' class=\'wp-smiley\' />  Vivamus nec diam in faucibus eu, bibendum varius nec, imperdiet purus est, at augue at lacus malesuada elit dapibus a, <img src=\'' . $includes_path . 'icon_surprised.gif\' alt=\':eek:\' class=\'wp-smiley\' />  mauris. Cras mauris viverra elit. Nam laoreet viverra. Pellentesque tortor. Nam libero ante, porta urna ut turpis. Nullam wisi magna, <img src=\'' . $includes_path . 'icon_mrgreen.gif\' alt=\':mrgreen:\' class=\'wp-smiley\' />  tincidunt nec, sagittis non, fringilla enim. Nam consectetuer nec, ullamcorper pede eu dui odio consequat vel, vehicula tortor quis pede turpis cursus quis, egestas ipsum ultricies ut, eleifend velit. Mauris vestibulum iaculis. Sed in nunc. Vivamus elit porttitor egestas. Mauris purus <img src=\'' . $includes_path . 'icon_question.gif\' alt=\':?:\' class=\'wp-smiley\' /> '
     19                'Lorem ipsum dolor sit amet mauris <img src="' . $includes_path . 'icon_wink.gif" alt=";-)" class="wp-smiley" />  Praesent gravida sodales. <img src="' . $includes_path . 'icon_lol.gif" alt=":lol:" class="wp-smiley" />  Vivamus nec diam in faucibus eu, bibendum varius nec, imperdiet purus est, at augue at lacus malesuada elit dapibus a, <img src="' . $includes_path . 'icon_surprised.gif" alt=":eek:" class="wp-smiley" />  mauris. Cras mauris viverra elit. Nam laoreet viverra. Pellentesque tortor. Nam libero ante, porta urna ut turpis. Nullam wisi magna, <img src="' . $includes_path . 'icon_mrgreen.gif" alt=":mrgreen:" class="wp-smiley" />  tincidunt nec, sagittis non, fringilla enim. Nam consectetuer nec, ullamcorper pede eu dui odio consequat vel, vehicula tortor quis pede turpis cursus quis, egestas ipsum ultricies ut, eleifend velit. Mauris vestibulum iaculis. Sed in nunc. Vivamus elit porttitor egestas. Mauris purus <img src="' . $includes_path . 'icon_question.gif" alt=":?:" class="wp-smiley" /> '
    2020            ),
    2121            array (
    2222                '<strong>Welcome to the jungle!</strong> We got fun n games! :) We got everything you want 8-) <em>Honey we know the names :)</em>',
    23                 '<strong>Welcome to the jungle!</strong> We got fun n games! <img src=\'' . $includes_path . 'icon_smile.gif\' alt=\':)\' class=\'wp-smiley\' />  We got everything you want <img src=\'' . $includes_path . 'icon_cool.gif\' alt=\'8-)\' class=\'wp-smiley\' />  <em>Honey we know the names <img src=\'' . $includes_path . 'icon_smile.gif\' alt=\':)\' class=\'wp-smiley\' /> </em>'
     23                '<strong>Welcome to the jungle!</strong> We got fun n games! <img src="' . $includes_path . 'icon_smile.gif" alt=":)" class="wp-smiley" />  We got everything you want <img src="' . $includes_path . 'icon_cool.gif" alt="8-)" class="wp-smiley" />  <em>Honey we know the names <img src="' . $includes_path . 'icon_smile.gif" alt=":)" class="wp-smiley" /> </em>'
    2424            ),
    2525            array (
    2626                "<strong;)>a little bit of this\na little bit:other: of that :D\n:D a little bit of good\nyeah with a little bit of bad8O",
    27                 "<strong;)>a little bit of this\na little bit:other: of that <img src='{$includes_path}icon_biggrin.gif' alt=':D' class='wp-smiley' />  <img src='{$includes_path}icon_biggrin.gif' alt=':D' class='wp-smiley' />  a little bit of good\nyeah with a little bit of bad8O"
     27                "<strong;)>a little bit of this\na little bit:other: of that <img src=\"{$includes_path}icon_biggrin.gif\" alt=\":D\" class=\"wp-smiley\" />  <img src=\"{$includes_path}icon_biggrin.gif\" alt=\":D\" class=\"wp-smiley\" />  a little bit of good\nyeah with a little bit of bad8O"
    2828            ),
    2929            array (
     
    7777            array (
    7878                'Peter Brian Gabriel (born 13 February 1950) is a British singer, musician, and songwriter who rose to fame as the lead vocalist and flautist of the progressive rock group Genesis. :monkey:',
    79                 'Peter Brian Gabriel (born 13 February 1950) is a British singer, musician, and songwriter who rose to fame as the lead vocalist and flautist of the progressive rock group Genesis. <img src=\'' . $includes_path . 'icon_shock_the_monkey.gif\' alt=\':monkey:\' class=\'wp-smiley\' /> '
     79                'Peter Brian Gabriel (born 13 February 1950) is a British singer, musician, and songwriter who rose to fame as the lead vocalist and flautist of the progressive rock group Genesis. <img src="' . $includes_path . 'icon_shock_the_monkey.gif" alt=":monkey:" class="wp-smiley" /> '
    8080            ),
    8181            array (
    8282                'Star Wars Jedi Knight :arrow: Jedi Academy is a first and third-person shooter action game set in the Star Wars universe. It was developed by Raven Software and published, distributed and marketed by LucasArts in North America and by Activision in the rest of the world. :nervou:',
    83                 'Star Wars Jedi Knight <img src=\'' . $includes_path . 'icon_arrow.gif\' alt=\':arrow:\' class=\'wp-smiley\' />  Jedi Academy is a first and third-person shooter action game set in the Star Wars universe. It was developed by Raven Software and published, distributed and marketed by LucasArts in North America and by Activision in the rest of the world. <img src=\'' . $includes_path . 'icon_nervou.gif\' alt=\':nervou:\' class=\'wp-smiley\' /> '
     83                'Star Wars Jedi Knight <img src="' . $includes_path . 'icon_arrow.gif" alt=":arrow:" class="wp-smiley" />  Jedi Academy is a first and third-person shooter action game set in the Star Wars universe. It was developed by Raven Software and published, distributed and marketed by LucasArts in North America and by Activision in the rest of the world. <img src="' . $includes_path . 'icon_nervou.gif" alt=":nervou:" class="wp-smiley" /> '
    8484            ),
    8585            array (
    8686                ':arrow: monkey: Lorem ipsum dolor sit amet enim. Etiam ullam :PP <br />corper. Suspendisse a pellentesque dui, non felis.<a> :arrow: :arrow</a>',
    87                 ' <img src=\'' . $includes_path . 'icon_arrow.gif\' alt=\':arrow:\' class=\'wp-smiley\' />  monkey: Lorem ipsum dolor sit amet enim. Etiam ullam <img src=\'' . $includes_path . 'icon_tongue.gif\' alt=\':PP\' class=\'wp-smiley\' />  <br />corper. Suspendisse a pellentesque dui, non felis.<a> <img src=\'' . $includes_path . 'icon_arrow.gif\' alt=\':arrow:\' class=\'wp-smiley\' />  :arrow</a>'
     87                ' <img src="' . $includes_path . 'icon_arrow.gif" alt=":arrow:" class="wp-smiley" />  monkey: Lorem ipsum dolor sit amet enim. Etiam ullam <img src="' . $includes_path . 'icon_tongue.gif" alt=":PP" class="wp-smiley" />  <br />corper. Suspendisse a pellentesque dui, non felis.<a> <img src="' . $includes_path . 'icon_arrow.gif" alt=":arrow:" class="wp-smiley" />  :arrow</a>'
    8888            ),
    8989        );
     
    151151
    152152        $in_str = 'Do we ingore smilies ;-) in ' . $element . ' tags <' . $element . '>My Content Here :?: </' . $element . '>';
    153         $exp_str = 'Do we ingore smilies <img src=\'' . $includes_path . 'icon_wink.gif\' alt=\';-)\' class=\'wp-smiley\' />  in ' . $element . ' tags <' . $element . '>My Content Here :?: </' . $element . '>';
     153        $exp_str = 'Do we ingore smilies <img src="' . $includes_path . 'icon_wink.gif" alt=";-)" class="wp-smiley" />  in ' . $element . ' tags <' . $element . '>My Content Here :?: </' . $element . '>';
    154154
    155155        // standard smilies, use_smilies: ON
     
    175175            array (
    176176                '8-O :-(',
    177                 ' <img src=\'' . $includes_path . 'icon_eek.gif\' alt=\'8-O\' class=\'wp-smiley\' />  <img src=\'' . $includes_path . 'icon_sad.gif\' alt=\':-(\' class=\'wp-smiley\' /> '
     177                ' <img src="' . $includes_path . 'icon_eek.gif" alt="8-O" class="wp-smiley" />  <img src="' . $includes_path . 'icon_sad.gif" alt=":-(" class="wp-smiley" /> '
    178178            ),
    179179            array (
    180180                '8-) 8-O',
    181                 ' <img src=\'' . $includes_path . 'icon_cool.gif\' alt=\'8-)\' class=\'wp-smiley\' />  <img src=\'' . $includes_path . 'icon_eek.gif\' alt=\'8-O\' class=\'wp-smiley\' /> '
     181                ' <img src="' . $includes_path . 'icon_cool.gif" alt="8-)" class="wp-smiley" />  <img src="' . $includes_path . 'icon_eek.gif" alt="8-O" class="wp-smiley" /> '
    182182            ),
    183183            array (
    184184                '8-) 8O',
    185                 ' <img src=\'' . $includes_path . 'icon_cool.gif\' alt=\'8-)\' class=\'wp-smiley\' />  <img src=\'' . $includes_path . 'icon_eek.gif\' alt=\'8O\' class=\'wp-smiley\' /> '
     185                ' <img src="' . $includes_path . 'icon_cool.gif" alt="8-)" class="wp-smiley" />  <img src="' . $includes_path . 'icon_eek.gif" alt="8O" class="wp-smiley" /> '
    186186            ),
    187187            array (
    188188                '8-) :-(',
    189                 ' <img src=\'' . $includes_path . 'icon_cool.gif\' alt=\'8-)\' class=\'wp-smiley\' />  <img src=\'' . $includes_path . 'icon_sad.gif\' alt=\':-(\' class=\'wp-smiley\' /> '
     189                ' <img src="' . $includes_path . 'icon_cool.gif" alt="8-)" class="wp-smiley" />  <img src="' . $includes_path . 'icon_sad.gif" alt=":-(" class="wp-smiley" /> '
    190190            ),
    191191            array (
    192192                '8-) :twisted:',
    193                 ' <img src=\'' . $includes_path . 'icon_cool.gif\' alt=\'8-)\' class=\'wp-smiley\' />  <img src=\'' . $includes_path . 'icon_twisted.gif\' alt=\':twisted:\' class=\'wp-smiley\' /> '
     193                ' <img src="' . $includes_path . 'icon_cool.gif" alt="8-)" class="wp-smiley" />  <img src="' . $includes_path . 'icon_twisted.gif" alt=":twisted:" class="wp-smiley" /> '
    194194            ),
    195195            array (
    196196                '8O :twisted: :( :? :(',
    197                 ' <img src=\'' . $includes_path . 'icon_eek.gif\' alt=\'8O\' class=\'wp-smiley\' />  <img src=\'' . $includes_path . 'icon_twisted.gif\' alt=\':twisted:\' class=\'wp-smiley\' />  <img src=\'' . $includes_path . 'icon_sad.gif\' alt=\':(\' class=\'wp-smiley\' />  <img src=\'' . $includes_path . 'icon_confused.gif\' alt=\':?\' class=\'wp-smiley\' />  <img src=\'' . $includes_path . 'icon_sad.gif\' alt=\':(\' class=\'wp-smiley\' /> '
     197                ' <img src="' . $includes_path . 'icon_eek.gif" alt="8O" class="wp-smiley" />  <img src="' . $includes_path . 'icon_twisted.gif" alt=":twisted:" class="wp-smiley" />  <img src="' . $includes_path . 'icon_sad.gif" alt=":(" class="wp-smiley" />  <img src="' . $includes_path . 'icon_confused.gif" alt=":?" class="wp-smiley" />  <img src="' . $includes_path . 'icon_sad.gif" alt=":(" class="wp-smiley" /> '
    198198            ),
    199199        );
     
    237237            array (
    238238                '8O :) additional text here :)',
    239                 '8O <img src=\'' . $includes_path . 'icon_smile.gif\' alt=\':)\' class=\'wp-smiley\' />  additional text here <img src=\'' . $includes_path . 'icon_smile.gif\' alt=\':)\' class=\'wp-smiley\' /> '
     239                '8O <img src="' . $includes_path . 'icon_smile.gif" alt=":)" class="wp-smiley" />  additional text here <img src="' . $includes_path . 'icon_smile.gif" alt=":)" class="wp-smiley" /> '
    240240            ),
    241241            array (
    242242                ':) :) :) :)',
    243                 ' <img src=\'' . $includes_path . 'icon_smile.gif\' alt=\':)\' class=\'wp-smiley\' />  <img src=\'' . $includes_path . 'icon_smile.gif\' alt=\':)\' class=\'wp-smiley\' />  <img src=\'' . $includes_path . 'icon_smile.gif\' alt=\':)\' class=\'wp-smiley\' />  <img src=\'' . $includes_path . 'icon_smile.gif\' alt=\':)\' class=\'wp-smiley\' /> '
     243                ' <img src="' . $includes_path . 'icon_smile.gif" alt=":)" class="wp-smiley" />  <img src="' . $includes_path . 'icon_smile.gif" alt=":)" class="wp-smiley" />  <img src="' . $includes_path . 'icon_smile.gif" alt=":)" class="wp-smiley" />  <img src="' . $includes_path . 'icon_smile.gif" alt=":)" class="wp-smiley" /> '
    244244            ),
    245245        );
Note: See TracChangeset for help on using the changeset viewer.