public static function setUpBeforeClass()
 {
     parent::setUpBeforeClass();
     $users = array(array('aardvark', 'Bob Smith'), array('alpaca red', 'William Quinn'), array('cat', 'Lauren Curtis'), array('caterpillar', 'Eldon Burrows'), array('dog green', 'Reece Thornton'), array('pig', 'Joshua Barton'), array('rabbit blue', 'Amber Hooper'), array('smith', 'Robert Bar'), array('snake', 'Eleanor Moore'), array('xylo', 'Silver McFadden'), array('zoom', 'Lisa Smithy'));
     $factory = new BP_UnitTest_Factory();
     // Create some dummy users.
     foreach ($users as $user_index => $user) {
         $new_user = $factory->user->create(array('display_name' => $user[1], 'user_login' => $user[0], 'user_email' => "test-{$user_index}@example.com"));
         self::$user_ids[$user[0]] = $new_user;
     }
     self::$group_slugs['hidden'] = 'the-maw';
     self::$group_slugs['public'] = 'the-great-journey';
     self::$group_slugs['private'] = 'tsavo-highway';
     // Create dummy groups.
     self::$group_ids['hidden'] = $factory->group->create(array('creator_id' => self::$user_ids['xylo'], 'slug' => self::$group_slugs['hidden'], 'status' => 'hidden'));
     self::$group_ids['public'] = $factory->group->create(array('creator_id' => self::$user_ids['xylo'], 'slug' => self::$group_slugs['public'], 'status' => 'public'));
     self::$group_ids['private'] = $factory->group->create(array('creator_id' => self::$user_ids['xylo'], 'slug' => self::$group_slugs['private'], 'status' => 'private'));
     // Add dummy users to dummy hidden groups.
     groups_join_group(self::$group_ids['hidden'], self::$user_ids['pig']);
     groups_join_group(self::$group_ids['hidden'], self::$user_ids['alpaca red']);
     // Add dummy users to dummy public groups.
     groups_join_group(self::$group_ids['public'], self::$user_ids['aardvark']);
     groups_join_group(self::$group_ids['public'], self::$user_ids['alpaca red']);
     groups_join_group(self::$group_ids['public'], self::$user_ids['cat']);
     groups_join_group(self::$group_ids['public'], self::$user_ids['smith']);
     // Add dummy users to dummy private groups.
     groups_join_group(self::$group_ids['private'], self::$user_ids['cat']);
     groups_join_group(self::$group_ids['private'], self::$user_ids['caterpillar']);
     self::commit_transaction();
 }
 public static function setUpBeforeClass()
 {
     parent::setUpBeforeClass();
     require_once buddypress()->plugin_dir . '/bp-core/admin/bp-core-admin-schema.php';
     /*
      * WP's test suite wipes out BP's email posts.
      * We must reestablish them before our tests can be successfully run.
      */
     bp_core_install_emails();
 }
 public static function setUpBeforeClass()
 {
     parent::setUpBeforeClass();
     self::$media_extractor = new BP_Media_Extractor();
     self::$richtext = "Hello world.\n\n\t\tThis sample text is used to test the media extractor parsing class. @paulgibbs thinks it's pretty cool.\n\t\tAnother thing really cool is this @youtube:\n\n\t\thttps://www.youtube.com/watch?v=2mjvfnUAfyo\n\n\t\tThis video is literally out of the world, but uses a different protocol to the embed above:\n\n\t\thttp://www.youtube.com/watch?v=KaOC9danxNo\n\n\t\t<a href='https://example.com'>Testing a regular link.</a>\n\t\t<strong>But we should throw in some markup and maybe even an <img src='http://example.com/image.gif'>.\n\t\t<a href='http://example.com'><img src='http://example.com/image-in-a-link.gif' /></a></strong>.\n\t\tIt definitely does not like <img src='data:1234567890A'>data URIs</img>. @\n\n\t\tThe parser only extracts wp_allowed_protocols() protocols, not something like <a href='phone:004400'>phone</a>.\n\n\t\t[caption id='example']Here is a caption shortcode.[/caption]\n\n\t\tThere are two types of [gallery] shortcodes; one like that, and another with IDs specified.\n\n\t\tAudio shortcodes:\n\t\t[audio src='http://example.com/source.mp3']\n\t\t[audio src='http://example.com/source.wav' loop='on' autoplay='off' preload='metadata'].\n\n\t\tThe following shortcode should be picked up by the shortcode extractor, but not the audio extractor, because\n\t\tit has an unrecognised file extension (for an audio file). [audio src='http://example.com/not_audio.gif']\n\t\t<a href='http://example.com/more_audio.mp3'>This should be picked up, too</a>.\n\n\t\tVideo shortcodes:\n\t\t[video src='http://example.com/source.ogv']\n\t\t[video src='http://example.com/source.webm' loop='on' autoplay='off' preload='metadata']\n\n\t\tThe following shortcode should be picked up by the shortcode extractor, but not the video extractor, because\n\t\tit has an unrecognised file extension (for a video file). [video src='http://example.com/not_video.mp3']\n\t\t";
 }