mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-05-21 19:54:32 +00:00
Tests: Use the data_ prefix for various data provider methods.
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
This commit is contained in:
@@ -404,7 +404,19 @@ EOF;
|
||||
$this->assertSame( $test_string, shortcode_unautop( wpautop( $test_string ) ) );
|
||||
}
|
||||
|
||||
public function data_test_strip_shortcodes() {
|
||||
/**
|
||||
* @ticket 10326
|
||||
*
|
||||
* @dataProvider data_strip_shortcodes
|
||||
*
|
||||
* @param string $expected Expected output.
|
||||
* @param string $content Content to run strip_shortcodes() on.
|
||||
*/
|
||||
public function test_strip_shortcodes( $expected, $content ) {
|
||||
$this->assertSame( $expected, strip_shortcodes( $content ) );
|
||||
}
|
||||
|
||||
public function data_strip_shortcodes() {
|
||||
return array(
|
||||
array( 'before', 'before[gallery]' ),
|
||||
array( 'after', '[gallery]after' ),
|
||||
@@ -419,18 +431,6 @@ EOF;
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @ticket 10326
|
||||
*
|
||||
* @dataProvider data_test_strip_shortcodes
|
||||
*
|
||||
* @param string $expected Expected output.
|
||||
* @param string $content Content to run strip_shortcodes() on.
|
||||
*/
|
||||
public function test_strip_shortcodes( $expected, $content ) {
|
||||
$this->assertSame( $expected, strip_shortcodes( $content ) );
|
||||
}
|
||||
|
||||
/**
|
||||
* @ticket 37767
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user