Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
03/16/2015 04:01:29 PM (10 years ago)
Author:
djpaul
Message:

Tests: Fix media extractor unit tests.

Also moves user creation into the media extractor tests that need it. This makes the new tests more performant.

See r9619 and #6177.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/phpunit/testcases/core/class-bp-media-extractor.php

    r9619 r9620  
    5252    }
    5353
    54     public function setUp() {
    55         parent::setUp();
    56 
    57         $this->factory->user->create( array( 'user_login' => 'paulgibbs' ) );
    58     }
    59 
    60     public function tearDown() {
    61         parent::tearDown();
    62 
    63         $this->remove_added_uploads();
    64     }
    65 
    6654
    6755    /**
     
    156144
    157145    public function test_extract_multiple_media_types_from_content() {
     146        $this->factory->user->create( array( 'user_login' => 'paulgibbs' ) );
    158147        $media = self::$media_extractor->extract( self::$richtext, BP_Media_Extractor::LINKS | BP_Media_Extractor::MENTIONS );
    159148
     
    201190
    202191    public function test_extract_mentions_from_content_with_activity_enabled() {
     192        $this->factory->user->create( array( 'user_login' => 'paulgibbs' ) );
    203193        $media = self::$media_extractor->extract( self::$richtext, BP_Media_Extractor::MENTIONS );
    204194
     
    208198
    209199    public function test_extract_mentions_from_content_with_activity_disabled() {
     200        $this->factory->user->create( array( 'user_login' => 'paulgibbs' ) );
    210201        $was_activity_enabled = false;
    211202
Note: See TracChangeset for help on using the changeset viewer.