mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2025-10-16 12:05:38 +00:00
This aims to bring more consistency to the test suite, as the vast majority of data providers already use that prefix. Includes moving some data providers next to the tests they are used in. Follow-up to [55464]. See #57841. git-svn-id: https://develop.svn.wordpress.org/trunk@55562 602fd350-edb4-49c9-b593-d223f7449a82
33 lines
725 B
PHP
33 lines
725 B
PHP
<?php
|
|
|
|
/**
|
|
* @group formatting
|
|
*
|
|
* @covers ::sanitize_trackback_urls
|
|
*/
|
|
class Tests_Formatting_SanitizeTrackbackUrls extends WP_UnitTestCase {
|
|
/**
|
|
* @ticket 21624
|
|
* @dataProvider data_sanitize_trackback_urls_with_multiple_urls
|
|
*/
|
|
public function test_sanitize_trackback_urls_with_multiple_urls( $separator ) {
|
|
$this->assertSame(
|
|
"http://example.com\nhttp://example.org",
|
|
sanitize_trackback_urls( "http://example.com{$separator}http://example.org" )
|
|
);
|
|
}
|
|
|
|
public function data_sanitize_trackback_urls_with_multiple_urls() {
|
|
return array(
|
|
array( "\r\n\t " ),
|
|
array( "\r" ),
|
|
array( "\n" ),
|
|
array( "\t" ),
|
|
array( ' ' ),
|
|
array( ' ' ),
|
|
array( "\n " ),
|
|
array( "\r\n" ),
|
|
);
|
|
}
|
|
}
|