Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
02/27/2015 03:00:42 AM (10 years ago)
Author:
boonebgorges
Message:

Don't create a current user by default in most unit tests.

The default state of our tests should be as a logged-out user. BP does pretty
different things with different kinds of logged-in users, so individual tests
should decide for themselves what the current user status should be.

Moreover, the creation of fixture users is fairly resource-intensive. Not
creating users when they're not needed makes the test suite run 5-10% faster.

See #6009.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/phpunit/testcases/xprofile/class-bp-xprofile-field-type.php

    r8958 r9561  
    55 */
    66class BP_Tests_XProfile_Field_Type extends BP_UnitTestCase {
    7     public function setUp() {
    8         parent::setUp();
    9     }
    10 
    11     public function tearDown() {
    12         parent::tearDown();
    13     }
    14 
    157    public function test_unregistered_field_type_returns_textbox() {
    168        $field = bp_xprofile_create_field_type( 'fakeyfield' );
Note: See TracChangeset for help on using the changeset viewer.