From 0202bed74d887e520a59b8753af42065ba210582 Mon Sep 17 00:00:00 2001 From: "Dominik Schilling (ocean90)" Date: Fri, 12 May 2017 07:37:33 +0000 Subject: [PATCH] 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 --- tests/phpunit/tests/import/base.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tests/phpunit/tests/import/base.php b/tests/phpunit/tests/import/base.php index 31f054b8fe..bd8e391bfb 100644 --- a/tests/phpunit/tests/import/base.php +++ b/tests/phpunit/tests/import/base.php @@ -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;