Make WordPress Core


Ignore:
Timestamp:
11/04/2021 03:22:47 PM (3 years ago)
Author:
hellofromTonya
Message:

Coding Standards: Add visibility to methods in tests/phpunit/tests/.

Adds a public visibility to test fixtures, tests, data providers, and callbacks methods.

Adds a private visibility to helper methods within test classes.

Renames callbacks and helpers that previously started with a _ prefix. Why? For consistency and to leverage using the method visibility. Further naming standardizations is beyond the scope of this commit.

Props costdev, jrf, hellofromTonya.
Fixes #54177.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/phpunit/tests/image/meta.php

    r50771 r52010  
    2929    }
    3030
    31     function test_exif_d70() {
     31    public function test_exif_d70() {
    3232        // Exif from a Nikon D70.
    3333        $out = wp_read_image_metadata( DIR_TESTDATA . '/images/2004-07-22-DSC_0008.jpg' );
     
    4545    }
    4646
    47     function test_exif_d70_mf() {
     47    public function test_exif_d70_mf() {
    4848        // Exif from a Nikon D70 - manual focus lens, so some data is unavailable.
    4949        $out = wp_read_image_metadata( DIR_TESTDATA . '/images/2007-06-17DSC_4173.JPG' );
     
    6262    }
    6363
    64     function test_exif_d70_iptc() {
     64    public function test_exif_d70_iptc() {
    6565        // Exif from a Nikon D70 with IPTC data added later.
    6666        $out = wp_read_image_metadata( DIR_TESTDATA . '/images/2004-07-22-DSC_0007.jpg' );
     
    7878    }
    7979
    80     function test_exif_fuji() {
     80    public function test_exif_fuji() {
    8181        // Exif from a Fuji FinePix S5600 (thanks Mark).
    8282        $out = wp_read_image_metadata( DIR_TESTDATA . '/images/a2-small.jpg' );
     
    9898     * @ticket 6571
    9999     */
    100     function test_exif_error() {
     100    public function test_exif_error() {
    101101        // https://core.trac.wordpress.org/ticket/6571
    102102        // This triggers a warning mesage when reading the Exif block.
     
    115115    }
    116116
    117     function test_exif_no_data() {
     117    public function test_exif_no_data() {
    118118        // No Exif data in this image (from burningwell.org).
    119119        $out = wp_read_image_metadata( DIR_TESTDATA . '/images/canola.jpg' );
     
    134134     * @ticket 9417
    135135     */
    136     function test_utf8_iptc_tags() {
     136    public function test_utf8_iptc_tags() {
    137137        // Trilingual UTF-8 text in the ITPC caption-abstract field.
    138138        $out = wp_read_image_metadata( DIR_TESTDATA . '/images/test-image-iptc.jpg' );
Note: See TracChangeset for help on using the changeset viewer.