From daa1e84d9fddb06665948d6ae68a1cf3064b20f8 Mon Sep 17 00:00:00 2001
From: jrfnl <jrfnl@users.noreply.github.com>
Date: Tue, 8 Oct 2019 03:27:31 +0200
Subject: [PATCH] [Tests] Deprecated hooks: use x.x.x style version numbers
---
tests/phpunit/tests/actions.php | 4 ++--
tests/phpunit/tests/filters.php | 6 +++---
2 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/tests/phpunit/tests/actions.php b/tests/phpunit/tests/actions.php
index d23e6a63b2..7238d5560e 100644
a
|
b
|
class Tests_Actions extends WP_UnitTestCase { |
527 | 527 | $p = new WP_Post( (object) array( 'post_title' => 'Foo' ) ); |
528 | 528 | |
529 | 529 | add_action( 'tests_do_action_deprecated', array( __CLASS__, 'deprecated_action_callback' ) ); |
530 | | do_action_deprecated( 'tests_do_action_deprecated', array( $p ), '4.6' ); |
| 530 | do_action_deprecated( 'tests_do_action_deprecated', array( $p ), '4.6.0' ); |
531 | 531 | remove_action( 'tests_do_action_deprecated', array( __CLASS__, 'deprecated_action_callback' ) ); |
532 | 532 | |
533 | 533 | $this->assertSame( 'Bar', $p->post_title ); |
… |
… |
class Tests_Actions extends WP_UnitTestCase { |
546 | 546 | $p2 = new WP_Post( (object) array( 'post_title' => 'Foo2' ) ); |
547 | 547 | |
548 | 548 | add_action( 'tests_do_action_deprecated', array( __CLASS__, 'deprecated_action_callback_multiple_params' ), 10, 2 ); |
549 | | do_action_deprecated( 'tests_do_action_deprecated', array( $p1, $p2 ), '4.6' ); |
| 549 | do_action_deprecated( 'tests_do_action_deprecated', array( $p1, $p2 ), '4.6.0' ); |
550 | 550 | remove_action( 'tests_do_action_deprecated', array( __CLASS__, 'deprecated_action_callback_multiple_params' ), 10, 2 ); |
551 | 551 | |
552 | 552 | $this->assertSame( 'Bar1', $p1->post_title ); |
diff --git a/tests/phpunit/tests/filters.php b/tests/phpunit/tests/filters.php
index 03af7e56ce..2060fe1c73 100644
a
|
b
|
class Tests_Filters extends WP_UnitTestCase { |
303 | 303 | $p = 'Foo'; |
304 | 304 | |
305 | 305 | add_filter( 'tests_apply_filters_deprecated', array( __CLASS__, 'deprecated_filter_callback' ) ); |
306 | | $p = apply_filters_deprecated( 'tests_apply_filters_deprecated', array( $p ), '4.6' ); |
| 306 | $p = apply_filters_deprecated( 'tests_apply_filters_deprecated', array( $p ), '4.6.0' ); |
307 | 307 | remove_filter( 'tests_apply_filters_deprecated', array( __CLASS__, 'deprecated_filter_callback' ) ); |
308 | 308 | |
309 | 309 | $this->assertSame( 'Bar', $p ); |
… |
… |
class Tests_Filters extends WP_UnitTestCase { |
323 | 323 | $p2 = 'Foo2'; |
324 | 324 | |
325 | 325 | add_filter( 'tests_apply_filters_deprecated', array( __CLASS__, 'deprecated_filter_callback_multiple_params' ), 10, 2 ); |
326 | | $p1 = apply_filters_deprecated( 'tests_apply_filters_deprecated', array( $p1, $p2 ), '4.6' ); |
| 326 | $p1 = apply_filters_deprecated( 'tests_apply_filters_deprecated', array( $p1, $p2 ), '4.6.0' ); |
327 | 327 | remove_filter( 'tests_apply_filters_deprecated', array( __CLASS__, 'deprecated_filter_callback_multiple_params' ), 10, 2 ); |
328 | 328 | |
329 | 329 | $this->assertSame( 'Bar1', $p1 ); |
… |
… |
class Tests_Filters extends WP_UnitTestCase { |
345 | 345 | public function test_apply_filters_deprecated_without_filter() { |
346 | 346 | $val = 'Foobar'; |
347 | 347 | |
348 | | $this->assertSame( $val, apply_filters_deprecated( 'tests_apply_filters_deprecated', array( $val ), '4.6' ) ); |
| 348 | $this->assertSame( $val, apply_filters_deprecated( 'tests_apply_filters_deprecated', array( $val ), '4.6.0' ) ); |
349 | 349 | } |
350 | 350 | |
351 | 351 | private $current_priority; |