Commit 8c8e2264 authored by Dries's avatar Dries

Issue #1509968 by dcam, tobiassjosten: Consistently use count() instead of sizeof() alias.

parent cf40686a
......@@ -2747,7 +2747,7 @@ protected function assertMail($name, $value = '', $message = '') {
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 @@ protected function assertMailPattern($field_name, $regex, $message) {
*/
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 @@ function testTaxonomyTermFieldMultipleVocabularies() {
// 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');
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment