Tests: Use consistent trailing punctuation in `fail()` messages.

See #51344.

git-svn-id: https://develop.svn.wordpress.org/trunk@49033 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Sergey Biryukov 2020-09-22 12:32:39 +00:00
parent a9ee47c806
commit 303deffe91
5 changed files with 7 additions and 7 deletions

View File

@ -730,7 +730,7 @@ class Tests_DB extends WP_UnitTestCase {
if ( count( $wpdb->get_results( 'SHOW CREATE PROCEDURE `test_mysqli_flush_sync_procedure`' ) ) < 1 ) {
$wpdb->suppress_errors( $suppress );
$this->fail( 'procedure could not be created (missing privileges?)' );
$this->fail( 'Procedure could not be created (missing privileges?)' );
}
$post_id = self::factory()->post->create();

View File

@ -435,7 +435,7 @@ abstract class WP_HTTP_UnitTestCase extends WP_UnitTestCase {
*/
function test_ssl() {
if ( ! wp_http_supports( array( 'ssl' ) ) ) {
$this->fail( 'This installation of PHP does not support SSL' );
$this->fail( 'This installation of PHP does not support SSL.' );
}
$res = wp_remote_get( 'https://wordpress.org/' );

View File

@ -42,7 +42,7 @@ abstract class WP_Tests_Image_Resize_UnitTestCase extends WP_Image_UnitTestCase
$image = $this->resize_helper( DIR_TESTDATA . '/images/test-image.png', 25, 25 );
if ( ! is_string( $image ) ) { // WP_Error, stop GLib-GObject-CRITICAL assertion.
$this->fail( sprintf( 'No PNG support in the editor engine %s on this system', $this->editor_engine ) );
$this->fail( sprintf( 'No PNG support in the editor engine %s on this system.', $this->editor_engine ) );
}
$this->assertSame( 'test-image-25x25.png', wp_basename( $image ) );
@ -58,7 +58,7 @@ abstract class WP_Tests_Image_Resize_UnitTestCase extends WP_Image_UnitTestCase
$image = $this->resize_helper( DIR_TESTDATA . '/images/test-image.gif', 25, 25 );
if ( ! is_string( $image ) ) { // WP_Error, stop GLib-GObject-CRITICAL assertion.
$this->fail( sprintf( 'No GIF support in the editor engine %s on this system', $this->editor_engine ) );
$this->fail( sprintf( 'No GIF support in the editor engine %s on this system.', $this->editor_engine ) );
}
$this->assertSame( 'test-image-25x25.gif', wp_basename( $image ) );

View File

@ -259,7 +259,7 @@ class Tests_Import_Parser extends WP_Import_UnitTestCase {
$value = 'This has <![CDATA[ opening and ]]> closing <![CDATA[ tags like this: ]]>';
break;
default:
$this->fail( 'Unknown postmeta (' . $meta['key'] . ') was parsed out by' . $p );
$this->fail( sprintf( 'Unknown postmeta (%1$s) was parsed out by %2$s.', $meta['key'], $p ) );
}
$this->assertSame( $value, $meta['value'], $message );
}
@ -290,7 +290,7 @@ class Tests_Import_Parser extends WP_Import_UnitTestCase {
$value = 'This has <![CDATA[ opening and ]]> closing <![CDATA[ tags like this: ]]>';
break;
default:
$this->fail( 'Unknown postmeta (' . $meta['key'] . ') was parsed out by' . $p );
$this->fail( sprintf( 'Unknown postmeta (%1$s) was parsed out by %2$s.', $meta['key'], $p ) );
}
$this->assertSame( $value, $meta['value'] );
}

View File

@ -197,7 +197,7 @@ class Tests_Theme extends WP_UnitTestCase {
function test_default_theme_in_default_theme_list() {
$latest_default_theme = WP_Theme::get_core_default_theme();
if ( ! $latest_default_theme->exists() || 'twenty' !== substr( $latest_default_theme->get_stylesheet(), 0, 6 ) ) {
$this->fail( 'No Twenty* series default themes are installed' );
$this->fail( 'No Twenty* series default themes are installed.' );
}
$this->assertContains( $latest_default_theme->get_stylesheet(), $this->default_themes );
}