SanitizeTrackbackUrls.php 575 B

123456789101112131415161718192021222324252627
  1. <?php
  2. /**
  3. * @group formatting
  4. */
  5. class Tests_Formatting_SanitizeTrackbackUrls extends WP_UnitTestCase {
  6. /**
  7. * @ticket 21624
  8. * @dataProvider breaks
  9. */
  10. function test_sanitize_trackback_urls_with_multiple_urls( $break ) {
  11. $this->assertEquals( "http://example.com\nhttp://example.org", sanitize_trackback_urls( "http://example.com{$break}http://example.org" ) );
  12. }
  13. function breaks() {
  14. return array(
  15. array( "\r\n\t " ),
  16. array( "\r" ),
  17. array( "\n" ),
  18. array( "\t" ),
  19. array( ' ' ),
  20. array( ' ' ),
  21. array( "\n " ),
  22. array( "\r\n" ),
  23. );
  24. }
  25. }