Make WordPress Core

Changeset 53527


Ignore:
Timestamp:
06/19/2022 03:43:34 PM (4 years ago)
Author:
SergeyBiryukov
Message:

Tests: Rename some test methods in Tests_Image_Functions for consistency.

This matches the names of the functions being tested:

  • file_is_valid_image()
  • file_is_displayable_image()

Follow-up to [184/tests], [53523], [53524], [53525], [53526].

See #55652.

File:
1 edited

Legend:

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

    r53526 r53527  
    6565
    6666    /**
    67      * @dataProvider data_is_image_positive
     67     * @dataProvider data_file_is_valid_image_positive
    6868     *
    6969     * @covers ::file_is_valid_image
     
    7272     * @param string $file File name.
    7373     */
    74     public function test_is_image_positive( $file ) {
     74    public function test_file_is_valid_image_positive( $file ) {
    7575        $this->assertTrue(
    7676            file_is_valid_image( DIR_TESTDATA . '/images/' . $file ),
     
    8484     * @return array
    8585     */
    86     public function data_is_image_positive() {
     86    public function data_file_is_valid_image_positive() {
    8787        // These are all image files recognized by PHP.
    8888        $files = array(
     
    109109
    110110    /**
    111      * @dataProvider data_is_image_negative
     111     * @dataProvider data_file_is_valid_image_negative
    112112     *
    113113     * @covers ::file_is_valid_image
     
    116116     * @param string $file File name.
    117117     */
    118     public function test_is_image_negative( $file ) {
     118    public function test_file_is_valid_image_negative( $file ) {
    119119        $this->assertFalse(
    120120            file_is_valid_image( DIR_TESTDATA . '/images/' . $file ),
     
    128128     * @return array
    129129     */
    130     public function data_is_image_negative() {
     130    public function data_file_is_valid_image_negative() {
    131131        // These are actually image files but aren't recognized or usable by PHP.
    132132        $files = array(
     
    140140
    141141    /**
    142      * @dataProvider data_is_displayable_image_positive
     142     * @dataProvider data_file_is_displayable_image_positive
    143143     *
    144144     * @covers ::file_is_displayable_image
     
    146146     * @param string $file File name.
    147147     */
    148     public function test_is_displayable_image_positive( $file ) {
     148    public function test_file_is_displayable_image_positive( $file ) {
    149149        $this->assertTrue(
    150150            file_is_displayable_image( DIR_TESTDATA . '/images/' . $file ),
     
    158158     * @return array
    159159     */
    160     public function data_is_displayable_image_positive() {
     160    public function data_file_is_displayable_image_positive() {
    161161        // These are all usable in typical web browsers.
    162162        $files = array(
     
    182182
    183183    /**
    184      * @dataProvider data_is_displayable_image_negative
     184     * @dataProvider data_file_is_displayable_image_negative
    185185     *
    186186     * @covers ::file_is_displayable_image
     
    188188     * @param string $file File name.
    189189     */
    190     public function test_is_displayable_image_negative( $file ) {
     190    public function test_file_is_displayable_image_negative( $file ) {
    191191        $this->assertFalse(
    192192            file_is_displayable_image( DIR_TESTDATA . '/images/' . $file ),
     
    200200     * @return array
    201201     */
    202     public function data_is_displayable_image_negative() {
     202    public function data_file_is_displayable_image_negative() {
    203203        // These are image files but aren't suitable for web pages because of compatibility or size issues.
    204204        $files = array(
Note: See TracChangeset for help on using the changeset viewer.