Skip to content

Commit bdfb6dc

Browse files
committed
Tests: Make the REST settings controller data providers static.
Allow PHPUnit 11 to discover the eight existing settings validation cases. Follow-up to [65828]. Developed in: #16351 Props mukesh27, shailu25. See #66804. git-svn-id: https://develop.svn.wordpress.org/trunk@65833 602fd350-edb4-49c9-b593-d223f7449a82
1 parent 70a3c51 commit bdfb6dc

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

‎tests/phpunit/tests/rest-api/rest-settings-controller.php‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -743,7 +743,7 @@ public function test_update_item_with_value_outside_schema( string $setting, $va
743743
*
744744
* @return array<non-falsy-string, array{ 0: non-falsy-string, 1: mixed }>
745745
*/
746-
public function data_update_item_with_value_outside_schema(): array {
746+
public static function data_update_item_with_value_outside_schema(): array {
747747
return array(
748748
'show_on_front that is not posts or page' => array( 'show_on_front', 'banana' ),
749749
'empty show_on_front' => array( 'show_on_front', '' ),
@@ -778,7 +778,7 @@ public function test_update_item_with_value_inside_schema( string $setting, $val
778778
*
779779
* @return array<non-falsy-string, array{ 0: non-falsy-string, 1: mixed }>
780780
*/
781-
public function data_update_item_with_value_inside_schema(): array {
781+
public static function data_update_item_with_value_inside_schema(): array {
782782
return array(
783783
'show_on_front set to page' => array( 'show_on_front', 'page' ),
784784
'show_on_front set to posts' => array( 'show_on_front', 'posts' ),

0 commit comments

Comments
 (0)