Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
05/03/2014 12:17:57 AM (12 years ago)
Author:
boonebgorges
Message:

Ensure that the BP_XProfile_Field_Type_Placeholder class has a validation regex

This ensures that any value will pass the is_valid() test for this field type.

Fixes #5589

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2.0/tests/testcases/xprofile/class-bp-xprofile-field-type.php

    r8337 r8346  
    160160        $this->assertTrue( $field->is_valid( array() ) );
    161161    }
     162
     163    /**
     164     * @group BP_XProfile_Field_Group_Type_Placeholder
     165     */
     166    public function test_placeholder_validate_any_value() {
     167        $field = bp_xprofile_create_field_type( 'foo' );
     168        $this->assertTrue( $field->is_valid( '' ) );
     169        $this->assertTrue( $field->is_valid( 'bar' ) );
     170        $this->assertTrue( $field->is_valid( array( 'bar' ) ) );
     171    }
    162172}
Note: See TracChangeset for help on using the changeset viewer.