mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-07-07 10:40:11 +00:00
Build/Test Tools: Remove many unnecessary calls to rand_str() which can, in theory, fail at random. Static strings are much more appropriate.
See #37371 git-svn-id: https://develop.svn.wordpress.org/trunk@38382 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -110,7 +110,7 @@ class Tests_Term_WpSetObjectTerms extends WP_UnitTestCase {
|
||||
|
||||
$terms = array();
|
||||
for ($i=0; $i<3; $i++ ) {
|
||||
$term = rand_str();
|
||||
$term = "term_{$i}";
|
||||
$result = wp_insert_term( $term, $this->taxonomy );
|
||||
$this->assertInternalType( 'array', $result );
|
||||
$term_id[$term] = $result['term_id'];
|
||||
@@ -245,7 +245,7 @@ class Tests_Term_WpSetObjectTerms extends WP_UnitTestCase {
|
||||
// first set: 3 terms
|
||||
$terms_1 = array();
|
||||
for ($i=0; $i<3; $i++ ) {
|
||||
$term = rand_str();
|
||||
$term = "term_{$i}";
|
||||
$result = wp_insert_term( $term, $this->taxonomy );
|
||||
$this->assertInternalType( 'array', $result );
|
||||
$terms_1[$i] = $result['term_id'];
|
||||
@@ -255,7 +255,7 @@ class Tests_Term_WpSetObjectTerms extends WP_UnitTestCase {
|
||||
$terms_2 = array();
|
||||
$terms_2[0] = $terms_1[1];
|
||||
|
||||
$term = rand_str();
|
||||
$term = 'term';
|
||||
$result = wp_insert_term( $term, $this->taxonomy );
|
||||
$terms_2[1] = $result['term_id'];
|
||||
|
||||
|
||||
Reference in New Issue
Block a user