WordPress.org

Make WordPress Core

Changeset 51172


Ignore:
Timestamp:
06/16/2021 05:30:07 PM (3 months ago)
Author:
SergeyBiryukov
Message:

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.

Location:
trunk/tests/phpunit/tests/media
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/phpunit/tests/media/getAdjacentImageLink.php

    r51122 r51172  
    44
    55/**
    6  * @group  media
     6 * @group media
    77 * @covers ::get_adjacent_image_link
    88 */
  • trunk/tests/phpunit/tests/media/getNextImageLink.php

    r51122 r51172  
    44
    55/**
    6  * @group  media
     6 * @group media
    77 * @covers ::get_next_image_link
    88 */
     
    1818     * @dataProvider data_get_next_image_link
    1919     */
    20     function test_get_next_image_link( $current_attachment_index, $expected_attachment_index = 0, $expected, array $args = array() ) {
     20    function test_get_next_image_link( $current_attachment_index, $expected_attachment_index, $expected, array $args = array() ) {
    2121        list( $expected, $args ) = $this->setup_test_scenario( $current_attachment_index, $expected_attachment_index, $expected, $args );
    2222
  • trunk/tests/phpunit/tests/media/getPreviousImageLink.php

    r51122 r51172  
    44
    55/**
    6  * @group  media
     6 * @group media
    77 * @covers ::get_previous_image_link
    88 */
     
    1818     * @dataProvider data_get_previous_image_link
    1919     */
    20     function test_get_previous_image_link( $current_attachment_index, $expected_attachment_index = 0, $expected, array $args = array() ) {
     20    function test_get_previous_image_link( $current_attachment_index, $expected_attachment_index, $expected, array $args = array() ) {
    2121        list( $expected, $args ) = $this->setup_test_scenario( $current_attachment_index, $expected_attachment_index, $expected, $args );
    2222
  • trunk/tests/phpunit/tests/media/nextImageLink.php

    r51122 r51172  
    44
    55/**
    6  * @group  media
     6 * @group media
    77 * @covers ::next_image_link
    88 */
     
    1818     * @dataProvider data_next_image_link
    1919     */
    20     function test_next_image_link( $current_attachment_index, $expected_attachment_index = 0, $expected, array $args = array() ) {
     20    function test_next_image_link( $current_attachment_index, $expected_attachment_index, $expected, array $args = array() ) {
    2121        list( $expected, $args ) = $this->setup_test_scenario( $current_attachment_index, $expected_attachment_index, $expected, $args );
    2222
  • trunk/tests/phpunit/tests/media/previousImageLink.php

    r51122 r51172  
    44
    55/**
    6  * @group  media
     6 * @group media
    77 * @covers ::previous_image_link
    88 */
     
    1818     * @dataProvider data_previous_image_link
    1919     */
    20     function test_previous_image_link( $current_attachment_index, $expected_attachment_index = 0, $expected, array $args = array() ) {
     20    function test_previous_image_link( $current_attachment_index, $expected_attachment_index, $expected, array $args = array() ) {
    2121        list( $expected, $args ) = $this->setup_test_scenario( $current_attachment_index, $expected_attachment_index, $expected, $args );
    2222
Note: See TracChangeset for help on using the changeset viewer.