WordPress.org

Make WordPress Core

Changeset 484 in tests


Ignore:
Timestamp:
12/16/2011 03:56:23 AM (6 years ago)
Author:
nacin
Message:

Remove old, broken, useless test_wp_dropdown_users(). see [21] for introduction.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • wp-testcase/test_user.php

    r483 r484  
    136136                $this->assertTrue(in_array($v, $out));
    137137        }
    138     }
    139 
    140     // simple test for user dropdown
    141     function test_wp_dropdown_users() {
    142         // mu doesn't have this function?
    143         if (!is_callable('wp_dropdown_users'))
    144             return $this->markTestSkipped();
    145 
    146         // add some users
    147         foreach (array('administrator', 'editor', 'author', 'contributor', 'subscriber') as $role) {
    148             $id = $this->_make_user($role, "test-{$role}");
    149             $user[] = $id;
    150         }
    151 
    152         $expected = <<<EOF
    153 <select name='user' id='user' class=''>
    154 <option value='1'>{$this->author->display_name}</option>
    155 <option value='{$user[0]}'>test-administrator</option>
    156 <option value='{$user[1]}'>test-editor</option>
    157 <option value='{$user[2]}'>test-author</option>
    158 <option value='{$user[3]}'>test-contributor</option>
    159 <option value='{$user[4]}'>test-subscriber</option>
    160 </select>
    161 EOF;
    162 
    163         $out = wp_dropdown_users('echo=0&orderby=ID');
    164 
    165         $this->assertEquals(strip_ws($expected), strip_ws($out));
    166138    }
    167139
Note: See TracChangeset for help on using the changeset viewer.