Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
11/03/2017 07:44:10 PM (4 years ago)
Author:
boonebgorges
Message:

Use static factory method throughout PHPUnit tests.

See #7620.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/phpunit/testcases/blogs/cache.php

    r9839 r11737  
    1414        }
    1515
    16         $b1 = $this->factory->blog->create();
    17         $b2 = $this->factory->blog->create();
     16        $b1 = self::factory()->blog->create();
     17        $b2 = self::factory()->blog->create();
    1818
    1919        bp_blogs_add_blogmeta( $b1, 'foo', 'bar' );
     
    9595        }
    9696
    97         $u = $this->factory->user->create();
     97        $u = self::factory()->user->create();
    9898
    9999        // Switch user so we have access to non-public blogs
     
    101101        $this->set_current_user( $u );
    102102
    103         $b1 = $this->factory->blog->create();
    104         $b2 = $this->factory->blog->create();
     103        $b1 = self::factory()->blog->create();
     104        $b2 = self::factory()->blog->create();
    105105
    106106        bp_blogs_record_blog( $b1, $u, true );
     
    189189        }
    190190
    191         $u = $this->factory->user->create();
     191        $u = self::factory()->user->create();
    192192
    193193        // Switch user so we have access to non-public blogs
     
    195195        $this->set_current_user( $u );
    196196
    197         $b1 = $this->factory->blog->create();
    198         $b2 = $this->factory->blog->create();
     197        $b1 = self::factory()->blog->create();
     198        $b2 = self::factory()->blog->create();
    199199
    200200        bp_blogs_record_blog( $b1, $u, true );
     
    264264        }
    265265
    266         $u = $this->factory->user->create();
     266        $u = self::factory()->user->create();
    267267
    268268        // need to make sure we set the 'public' flag due to how BP_Blogs_Blogs:get_all() works
    269         $b1 = $this->factory->blog->create( array(
     269        $b1 = self::factory()->blog->create( array(
    270270            'meta' => array(
    271271                'public' => 1
    272272            )
    273273        ) );
    274         $b2 = $this->factory->blog->create( array(
     274        $b2 = self::factory()->blog->create( array(
    275275            'meta' => array(
    276276                'public' => 1
     
    298298        }
    299299
    300         $u = $this->factory->user->create();
    301 
    302         $b1 = $this->factory->blog->create();
     300        $u = self::factory()->user->create();
     301
     302        $b1 = self::factory()->blog->create();
    303303        bp_blogs_record_blog( $b1, $u, true );
    304304
Note: See TracChangeset for help on using the changeset viewer.