mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-06-28 22:30:04 +00:00
Build/Test Tools: Begin eliminating unnecessary randomness in tests.
Although unlikely, clashes in randomly generated strings could cause unexpected failures. In addition, most randomness is entirely unnecessary, is bad practice, and increases test time (however small it may be). See #37371 git-svn-id: https://develop.svn.wordpress.org/trunk@38762 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -64,7 +64,7 @@ class Tests_WP_Embed extends WP_UnitTestCase {
|
||||
}
|
||||
|
||||
public function test_wp_embed_register_handler() {
|
||||
$handle = rand_str();
|
||||
$handle = __FUNCTION__;
|
||||
$regex = '#https?://example\.com/embed/([^/]+)#i';
|
||||
$callback = array( $this, '_embed_handler_callback' );
|
||||
|
||||
@@ -102,7 +102,7 @@ class Tests_WP_Embed extends WP_UnitTestCase {
|
||||
}
|
||||
|
||||
public function test_autoembed_should_return_modified_content() {
|
||||
$handle = rand_str();
|
||||
$handle = __FUNCTION__;
|
||||
$regex = '#https?://example\.com/embed/([^/]+)#i';
|
||||
$callback = array( $this, '_embed_handler_callback' );
|
||||
|
||||
|
||||
Reference in New Issue
Block a user