? sites/default/files ? sites/default/private ? sites/default/settings.php Index: modules/profile/profile.pages.inc =================================================================== RCS file: /cvs/drupal/drupal/modules/profile/profile.pages.inc,v retrieving revision 1.21 diff -u -p -r1.21 profile.pages.inc --- modules/profile/profile.pages.inc 9 Oct 2009 01:00:02 -0000 1.21 +++ modules/profile/profile.pages.inc 12 Dec 2009 16:31:08 -0000 @@ -33,7 +33,7 @@ function profile_browse() { ':visibility' => PROFILE_PUBLIC_LISTINGS, ))->fetchAll(); - $query = db_select('users')->extend('PagerDefault'); + $query = db_select('users', 'u')->extend('PagerDefault'); $query->join('profile_value', 'v', 'u.uid = v.uid'); $query ->fields('u', array('uid', 'access')) Index: modules/profile/profile.test =================================================================== RCS file: /cvs/drupal/drupal/modules/profile/profile.test,v retrieving revision 1.23 diff -u -p -r1.23 profile.test --- modules/profile/profile.test 20 Nov 2009 04:15:15 -0000 1.23 +++ modules/profile/profile.test 12 Dec 2009 16:31:09 -0000 @@ -394,10 +394,37 @@ class ProfileBlockTestCase extends Drupa } } +/** + * Test profile browsing. + */ +class ProfileTestBrowsing extends ProfileTestCase { + public static function getInfo() { + return array( + 'name' => 'Profile browsing', + 'description' => 'Test profile browsing.', + 'group' => 'Profile', + ); + } + + /** + * Test profile browsing. + */ + function testProfileBrowsing() { + $this->drupalLogin($this->admin_user); + $field = $this->createProfileField('list', 'simpletest', array('page' => '%value')); + + // Set a random value for the profile field. + $value = $this->setProfileField($field); + + // Check that user is found on the profile browse page. + $this->drupalGet("profile/{$field['form_name']}/$value"); + $this->assertText($this->normal_user->name); + } +} + /** * TODO: * - Test field visibility - * - Test profile browsing * - Test required fields * - Test fields on registration form * - Test updating fields