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

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

See #40109.

git-svn-id: https://develop.svn.wordpress.org/trunk@40649 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Dominik Schilling (ocean90) 2017-05-12 07:37:33 +00:00
parent 2156223d50
commit 0202bed74d
1 changed files with 3 additions and 2 deletions

View File

@ -23,8 +23,9 @@ abstract class WP_Import_UnitTestCase extends WP_UnitTestCase {
protected function _import_wp( $filename, $users = array(), $fetch_files = true ) {
$importer = new WP_Import();
$file = realpath( $filename );
assert('!empty($file)');
assert('is_file($file)');
$this->assertTrue( ! empty( $file ), 'Path to import file is empty.' );
$this->assertTrue( is_file( $file ), 'Import file is not a file.' );
$authors = $mapping = $new = array();
$i = 0;