WordPress.org

Make WordPress Core

Changeset 44703


Ignore:
Timestamp:
01/28/2019 04:53:14 PM (3 weeks ago)
Author:
SergeyBiryukov
Message:

Build/Test Tools: Correct WP_Test_REST_Schema_Sanitization::test_type_string() to check for both 1.1 float and '1.10' string explicitly.

Previously, the test only passed due to a bug in PHPUnit 7.1.x and older versions.

Fixes #43218. See #38586.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/phpunit/tests/rest-api/rest-schema-sanitization.php

    r44546 r44703  
    3939        );
    4040        $this->assertEquals( 'Hello', rest_sanitize_value_from_schema( 'Hello', $schema ) );
    41         $this->assertEquals( '1.10', rest_sanitize_value_from_schema( 1.10, $schema ) );
     41        $this->assertEquals( '1.10', rest_sanitize_value_from_schema( '1.10', $schema ) );
     42        $this->assertEquals( '1.1', rest_sanitize_value_from_schema( 1.1, $schema ) );
    4243        $this->assertEquals( '1', rest_sanitize_value_from_schema( 1, $schema ) );
    4344    }
Note: See TracChangeset for help on using the changeset viewer.