Make WordPress Core

Changeset 40649


Ignore:
Timestamp:
05/12/2017 07:37:33 AM (8 years ago)
Author:
ocean90
Message:

Import: Replace assert() calls with PHPUnit's assertTrue() method.

Calling assert() with a string argument will be deprecated in PHP 7.2.

See #40109.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/phpunit/tests/import/base.php

    r25002 r40649  
    2424        $importer = new WP_Import();
    2525        $file = realpath( $filename );
    26         assert('!empty($file)');
    27         assert('is_file($file)');
     26
     27        $this->assertTrue( ! empty( $file ), 'Path to import file is empty.' );
     28        $this->assertTrue( is_file( $file ), 'Import file is not a file.' );
    2829
    2930        $authors = $mapping = $new = array();
Note: See TracChangeset for help on using the changeset viewer.