diff options
author | Angie Byron <webchick@24967.no-reply.drupal.org> | 2010-03-08 15:46:58 +0000 |
---|---|---|
committer | Angie Byron <webchick@24967.no-reply.drupal.org> | 2010-03-08 15:46:58 +0000 |
commit | 59792013ccb13dbd38eefee11e418af67e1c207c (patch) | |
tree | f8cee014c3f6bfc097cb17b20ab73ffef8d9b046 /modules/profile | |
parent | 7b67066ecbe92d45a3ead9be363a2dce8e946e57 (diff) | |
download | brdo-59792013ccb13dbd38eefee11e418af67e1c207c.tar.gz brdo-59792013ccb13dbd38eefee11e418af67e1c207c.tar.bz2 |
#525058 by andypost, mfb, and oneoftwo: Fixed pages view for profile fields broken.
Diffstat (limited to 'modules/profile')
-rw-r--r-- | modules/profile/profile.pages.inc | 2 | ||||
-rw-r--r-- | modules/profile/profile.test | 29 |
2 files changed, 29 insertions, 2 deletions
diff --git a/modules/profile/profile.pages.inc b/modules/profile/profile.pages.inc index 346223285..023b2357c 100644 --- a/modules/profile/profile.pages.inc +++ b/modules/profile/profile.pages.inc @@ -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')) diff --git a/modules/profile/profile.test b/modules/profile/profile.test index c375fb3a1..61709d34a 100644 --- a/modules/profile/profile.test +++ b/modules/profile/profile.test @@ -394,10 +394,37 @@ class ProfileBlockTestCase extends DrupalWebTestCase { } } +/** + * 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 |