mirror of
git://develop.git.wordpress.org/
synced 2025-02-22 23:54:09 +01:00
Tests: Use assertSame()
in WP_oEmbed_Controller
tests.
This ensures that not only the return values match the expected results, but also that their type is the same. Going forward, stricter type checking by using `assertSame()` should generally be preferred to `assertEquals()` where appropriate, to make the tests more reliable. Follow-up to [41047]. Props costdev. See #60706. git-svn-id: https://develop.svn.wordpress.org/trunk@58044 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
d898a25d1a
commit
7159243c09
@ -606,8 +606,8 @@ class Test_oEmbed_Controller extends WP_UnitTestCase {
|
||||
$this->assertIsObject( $data );
|
||||
$this->assertSame( 'YouTube', $data->provider_name );
|
||||
$this->assertSame( 'https://i.ytimg.com/vi/' . self::YOUTUBE_VIDEO_ID . '/hqdefault.jpg', $data->thumbnail_url );
|
||||
$this->assertEquals( $data->width, $request['maxwidth'] );
|
||||
$this->assertEquals( $data->height, $request['maxheight'] );
|
||||
$this->assertSame( (int) $data->width, $request['maxwidth'] );
|
||||
$this->assertSame( (int) $data->height, $request['maxheight'] );
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
x
Reference in New Issue
Block a user