mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-07-01 15:50:09 +00:00
Media: Some documentation and test improvements for WebP support:
* Document that WebP constants are only defined in PHP 7.1+. * Correct the `$filename` parameter type in `wp_get_webp_info()`. * Use a consistent message when skipping tests due to the lack of WebP support. * Remove unnecessary `else` branches after `markTestSkipped()`. * Replace `assertEquals()` with more appropriate assertions. Follow-up to [50810]. See #35725. git-svn-id: https://develop.svn.wordpress.org/trunk@50814 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -1240,11 +1240,11 @@ class Tests_Functions extends WP_UnitTestCase {
|
||||
// let's restrict comparison to expected keys only.
|
||||
if ( is_array( $expected ) ) {
|
||||
foreach ( $expected as $k => $v ) {
|
||||
$this->assertEquals( true, isset( $result[ $k ] ) );
|
||||
$this->assertEquals( $expected[ $k ], $result[ $k ] );
|
||||
$this->assertArrayHasKey( $k, $result );
|
||||
$this->assertSame( $expected[ $k ], $result[ $k ] );
|
||||
}
|
||||
} else {
|
||||
$this->assertEquals( $expected, $result );
|
||||
$this->assertSame( $expected, $result );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1312,7 +1312,7 @@ class Tests_Functions extends WP_UnitTestCase {
|
||||
}
|
||||
|
||||
/**
|
||||
* Data provider for test_wp_get_image_mime();
|
||||
* Data provider for test_wp_get_image_mime().
|
||||
*/
|
||||
public function _wp_get_image_mime() {
|
||||
$data = array(
|
||||
@@ -1367,7 +1367,7 @@ class Tests_Functions extends WP_UnitTestCase {
|
||||
}
|
||||
|
||||
/**
|
||||
* Data profider for test_wp_getimagesize();
|
||||
* Data profider for test_wp_getimagesize().
|
||||
*/
|
||||
public function data_wp_getimagesize() {
|
||||
$data = array(
|
||||
|
||||
Reference in New Issue
Block a user