mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2025-10-16 12:05:38 +00:00
Tests: Simplify @covers tags in editor/wpEditors.php using @coversDefaultClass annotation.
Follow-up to [50288]. See #39265. git-svn-id: https://develop.svn.wordpress.org/trunk@50338 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
f626e2897b
commit
3f50750a50
@ -6,11 +6,13 @@ if ( ! class_exists( '_WP_Editors', false ) ) {
|
||||
|
||||
/**
|
||||
* @group editor
|
||||
*
|
||||
* @coversDefaultClass _WP_Editors
|
||||
*/
|
||||
class Tests_WP_Editors extends WP_UnitTestCase {
|
||||
|
||||
/**
|
||||
* @covers _WP_Editors::wp_link_query
|
||||
* @covers ::wp_link_query
|
||||
*/
|
||||
public function test_wp_link_query_returns_false_when_nothing_found() {
|
||||
$actual = _WP_Editors::wp_link_query( array( 's' => 'foobarbaz' ) );
|
||||
@ -19,7 +21,7 @@ class Tests_WP_Editors extends WP_UnitTestCase {
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers _WP_Editors::wp_link_query
|
||||
* @covers ::wp_link_query
|
||||
*/
|
||||
public function test_wp_link_query_returns_search_results() {
|
||||
$post = self::factory()->post->create_and_get( array( 'post_status' => 'publish' ) );
|
||||
@ -41,7 +43,7 @@ class Tests_WP_Editors extends WP_UnitTestCase {
|
||||
/**
|
||||
* @ticket 41825
|
||||
*
|
||||
* @covers _WP_Editors::wp_link_query
|
||||
* @covers ::wp_link_query
|
||||
*/
|
||||
public function test_wp_link_query_returns_filtered_result_when_nothing_found() {
|
||||
add_filter( 'wp_link_query', array( $this, 'wp_link_query_callback' ) );
|
||||
@ -62,7 +64,7 @@ class Tests_WP_Editors extends WP_UnitTestCase {
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers _WP_Editors::wp_link_query
|
||||
* @covers ::wp_link_query
|
||||
*/
|
||||
public function test_wp_link_query_returns_filtered_search_results() {
|
||||
$post = self::factory()->post->create_and_get( array( 'post_status' => 'publish' ) );
|
||||
|
||||
Loading…
Reference in New Issue
Block a user