Issue #1509968 by dcam, tobiassjosten: Consistently use count() instead of sizeof() alias.
parent
cf40686a77
commit
8c8e2264c0
|
@ -2747,7 +2747,7 @@ abstract class WebTestBase extends TestBase {
|
|||
protected function assertMailString($field_name, $string, $email_depth) {
|
||||
$mails = $this->drupalGetMails();
|
||||
$string_found = FALSE;
|
||||
for ($i = sizeof($mails) -1; $i >= sizeof($mails) - $email_depth && $i >= 0; $i--) {
|
||||
for ($i = count($mails) -1; $i >= count($mails) - $email_depth && $i >= 0; $i--) {
|
||||
$mail = $mails[$i];
|
||||
// Normalize whitespace, as we don't know what the mail system might have
|
||||
// done. Any run of whitespace becomes a single space.
|
||||
|
@ -2787,7 +2787,7 @@ abstract class WebTestBase extends TestBase {
|
|||
*/
|
||||
protected function verboseEmail($count = 1) {
|
||||
$mails = $this->drupalGetMails();
|
||||
for ($i = sizeof($mails) -1; $i >= sizeof($mails) - $count && $i >= 0; $i--) {
|
||||
for ($i = count($mails) -1; $i >= count($mails) - $count && $i >= 0; $i--) {
|
||||
$mail = $mails[$i];
|
||||
$this->verbose(t('Email:') . '<pre>' . print_r($mail, TRUE) . '</pre>');
|
||||
}
|
||||
|
|
|
@ -121,7 +121,7 @@ class TermFieldMultipleVocabularyTest extends TaxonomyTestBase {
|
|||
|
||||
// Verify that field and instance settings are correct.
|
||||
$field_info = field_info_field($this->field_name);
|
||||
$this->assertEqual(sizeof($field_info['settings']['allowed_values']), 1, 'Only one vocabulary is allowed for the field.');
|
||||
$this->assertEqual(count($field_info['settings']['allowed_values']), 1, 'Only one vocabulary is allowed for the field.');
|
||||
|
||||
// The widget should still be displayed.
|
||||
$this->drupalGet('test-entity/add/test_bundle');
|
||||
|
|
Loading…
Reference in New Issue