Make WordPress Core


Ignore:
Timestamp:
09/20/2019 10:01:36 PM (7 years ago)
Author:
SergeyBiryukov
Message:

Code Modernization: Remove all code using a version_compare() with a PHP version older than PHP 5.6.

Props jrf.
Fixes #48074.

File:
1 edited

Legend:

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

    r45607 r46214  
    492492
    493493        public function test_has_valid_params_json_error() {
    494                 if ( version_compare( PHP_VERSION, '5.3', '<' ) ) {
    495                         return $this->markTestSkipped( 'JSON validation is only available for PHP 5.3+' );
    496                 }
    497 
    498494                $this->request->set_header( 'Content-Type', 'application/json' );
    499495                $this->request->set_body( '{"invalid": JSON}' );
    … …  
    508504
    509505        public function test_has_valid_params_empty_json_no_error() {
    510                 if ( version_compare( PHP_VERSION, '5.3', '<' ) ) {
    511                         return $this->markTestSkipped( 'JSON validation is only available for PHP 5.3+' );
    512                 }
    513 
    514506                $this->request->set_header( 'Content-Type', 'application/json' );
    515507                $this->request->set_body( '' );
Note: See TracChangeset for help on using the changeset viewer.