mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-07-01 15:50:09 +00:00
Coding Standards: Add visibility to methods in tests/phpunit/tests/.
Adds a `public` visibility to test fixtures, tests, data providers, and callbacks methods. Adds a `private` visibility to helper methods within test classes. Renames callbacks and helpers that previously started with a `_` prefix. Why? For consistency and to leverage using the method visibility. Further naming standardizations is beyond the scope of this commit. Props costdev, jrf, hellofromTonya. Fixes #54177. git-svn-id: https://develop.svn.wordpress.org/trunk@52010 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -43,7 +43,7 @@ class Block_Template_Test extends WP_UnitTestCase {
|
||||
/**
|
||||
* Regression: https://github.com/WordPress/gutenberg/issues/31399.
|
||||
*/
|
||||
function test_custom_page_php_template_takes_precedence_over_all_other_templates() {
|
||||
public function test_custom_page_php_template_takes_precedence_over_all_other_templates() {
|
||||
$custom_page_template = 'templates/full-width.php';
|
||||
$custom_page_template_path = get_stylesheet_directory() . '/' . $custom_page_template;
|
||||
$type = 'page';
|
||||
@@ -60,7 +60,7 @@ class Block_Template_Test extends WP_UnitTestCase {
|
||||
/**
|
||||
* Covers: https://github.com/WordPress/gutenberg/pull/30438.
|
||||
*/
|
||||
function test_custom_page_block_template_takes_precedence_over_all_other_templates() {
|
||||
public function test_custom_page_block_template_takes_precedence_over_all_other_templates() {
|
||||
global $_wp_current_template_content;
|
||||
|
||||
$custom_page_block_template = 'wp-custom-template-my-block-template';
|
||||
@@ -80,7 +80,7 @@ class Block_Template_Test extends WP_UnitTestCase {
|
||||
/**
|
||||
* Regression: https://github.com/WordPress/gutenberg/issues/31652.
|
||||
*/
|
||||
function test_template_remains_unchanged_if_templates_array_is_empty() {
|
||||
public function test_template_remains_unchanged_if_templates_array_is_empty() {
|
||||
$resolved_template_path = locate_block_template( '', 'search', array() );
|
||||
$this->assertSame( '', $resolved_template_path );
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user