Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
07/02/2015 12:13:10 PM (9 years ago)
Author:
boonebgorges
Message:

Set the id property of a new BP_XProfile_Field object during the save() method.

Props Offereins.
Fixes #6545.

File:
1 edited

Legend:

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

    r9878 r9983  
    109109        );
    110110    }
     111
     112    /**
     113     * @ticket BP6545
     114     */
     115    public function test_newly_created_field_should_have_field_id_property_set() {
     116        $field = new BP_XProfile_Field();
     117        $field->group_id = 1;
     118        $field->name = 'Foo';
     119
     120        $new_field_id = $field->save();
     121
     122        $this->assertSame( $new_field_id, $field->id );
     123    }
    111124}
Note: See TracChangeset for help on using the changeset viewer.