Make WordPress Core


Ignore:
Timestamp:
08/13/2022 12:09:41 PM (21 months ago)
Author:
SergeyBiryukov
Message:

Tests: Bring some consistency to serialization tests.

There were two sets of tests for is_serialized():

  • One in the functions.php file, based on the same file name in core.
  • One in a separate class in the functions directory.

To avoid confusion and make it easier to decide where new tests should go in the future, the existing tests are now combined in the latter location.

Includes:

  • Moving is_serialized() and maybe_serialize() tests into their own classes.
  • Using named data providers to make test output more descriptive.
  • Combining test cases and removing duplicates.

Follow-up to [278/tests], [279/tests], [328/tests], [32631], [45754], [47452], [49382], [53886], [53889].

See #55652.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/phpunit/tests/functions/isSerializedString.php

    r53889 r53890  
    3232                'expected' => false,
    3333            ),
    34             'a class'                                 => array(
     34            'an object'                               => array(
    3535                'data'     => new stdClass(),
    3636                'expected' => false,
Note: See TracChangeset for help on using the changeset viewer.