mirror of
git://develop.git.wordpress.org/
synced 2025-03-21 12:29:53 +01:00
Tests: Make some optional parameters required in unit tests for previous/next attachment links.
This resolves a "Deprecated: Required parameter follows optional parameter" notice on PHP 8. Follow-up to [48794], [51122]. See #45708, #52625. git-svn-id: https://develop.svn.wordpress.org/trunk@51172 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
77adbdf376
commit
52e65717f9
@ -3,7 +3,7 @@
|
||||
require_once __DIR__ . '/testcase-adjacent-image-link.php';
|
||||
|
||||
/**
|
||||
* @group media
|
||||
* @group media
|
||||
* @covers ::get_adjacent_image_link
|
||||
*/
|
||||
class Tests_Media_GetAdjacentImageLink extends WP_Test_Adjacent_Image_Link_TestCase {
|
||||
|
@ -3,7 +3,7 @@
|
||||
require_once __DIR__ . '/testcase-adjacent-image-link.php';
|
||||
|
||||
/**
|
||||
* @group media
|
||||
* @group media
|
||||
* @covers ::get_next_image_link
|
||||
*/
|
||||
class Tests_Media_GetNextImageLink extends WP_Test_Adjacent_Image_Link_TestCase {
|
||||
@ -17,7 +17,7 @@ class Tests_Media_GetNextImageLink extends WP_Test_Adjacent_Image_Link_TestCase
|
||||
*
|
||||
* @dataProvider data_get_next_image_link
|
||||
*/
|
||||
function test_get_next_image_link( $current_attachment_index, $expected_attachment_index = 0, $expected, array $args = array() ) {
|
||||
function test_get_next_image_link( $current_attachment_index, $expected_attachment_index, $expected, array $args = array() ) {
|
||||
list( $expected, $args ) = $this->setup_test_scenario( $current_attachment_index, $expected_attachment_index, $expected, $args );
|
||||
|
||||
$actual = get_next_image_link( ...$args );
|
||||
|
@ -3,7 +3,7 @@
|
||||
require_once __DIR__ . '/testcase-adjacent-image-link.php';
|
||||
|
||||
/**
|
||||
* @group media
|
||||
* @group media
|
||||
* @covers ::get_previous_image_link
|
||||
*/
|
||||
class Tests_Media_GetPreviousImageLink extends WP_Test_Adjacent_Image_Link_TestCase {
|
||||
@ -17,7 +17,7 @@ class Tests_Media_GetPreviousImageLink extends WP_Test_Adjacent_Image_Link_TestC
|
||||
*
|
||||
* @dataProvider data_get_previous_image_link
|
||||
*/
|
||||
function test_get_previous_image_link( $current_attachment_index, $expected_attachment_index = 0, $expected, array $args = array() ) {
|
||||
function test_get_previous_image_link( $current_attachment_index, $expected_attachment_index, $expected, array $args = array() ) {
|
||||
list( $expected, $args ) = $this->setup_test_scenario( $current_attachment_index, $expected_attachment_index, $expected, $args );
|
||||
|
||||
$actual = get_previous_image_link( ...$args );
|
||||
|
@ -3,7 +3,7 @@
|
||||
require_once __DIR__ . '/testcase-adjacent-image-link.php';
|
||||
|
||||
/**
|
||||
* @group media
|
||||
* @group media
|
||||
* @covers ::next_image_link
|
||||
*/
|
||||
class Tests_Media_NextImageLink extends WP_Test_Adjacent_Image_Link_TestCase {
|
||||
@ -17,7 +17,7 @@ class Tests_Media_NextImageLink extends WP_Test_Adjacent_Image_Link_TestCase {
|
||||
*
|
||||
* @dataProvider data_next_image_link
|
||||
*/
|
||||
function test_next_image_link( $current_attachment_index, $expected_attachment_index = 0, $expected, array $args = array() ) {
|
||||
function test_next_image_link( $current_attachment_index, $expected_attachment_index, $expected, array $args = array() ) {
|
||||
list( $expected, $args ) = $this->setup_test_scenario( $current_attachment_index, $expected_attachment_index, $expected, $args );
|
||||
|
||||
$this->expectOutputString( $expected );
|
||||
|
@ -3,7 +3,7 @@
|
||||
require_once __DIR__ . '/testcase-adjacent-image-link.php';
|
||||
|
||||
/**
|
||||
* @group media
|
||||
* @group media
|
||||
* @covers ::previous_image_link
|
||||
*/
|
||||
class Tests_Media_PreviousImageLink extends WP_Test_Adjacent_Image_Link_TestCase {
|
||||
@ -17,7 +17,7 @@ class Tests_Media_PreviousImageLink extends WP_Test_Adjacent_Image_Link_TestCase
|
||||
*
|
||||
* @dataProvider data_previous_image_link
|
||||
*/
|
||||
function test_previous_image_link( $current_attachment_index, $expected_attachment_index = 0, $expected, array $args = array() ) {
|
||||
function test_previous_image_link( $current_attachment_index, $expected_attachment_index, $expected, array $args = array() ) {
|
||||
list( $expected, $args ) = $this->setup_test_scenario( $current_attachment_index, $expected_attachment_index, $expected, $args );
|
||||
|
||||
$this->expectOutputString( $expected );
|
||||
|
Loading…
x
Reference in New Issue
Block a user