Changeset 8633
- Timestamp:
- 07/16/2014 10:34:38 PM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/testcases/xprofile/class-bp-xprofile-field-type.php
r8347 r8633 156 156 157 157 /** 158 * @group url 159 */ 160 public function test_url_validate_url() { 161 $field = bp_xprofile_create_field_type( 'url' ); 162 163 $this->assertTrue( $field->is_valid( 'http://foo.com' ) ); 164 $this->assertTrue( $field->is_valid( 'https://foo.com' ) ); 165 $this->assertTrue( $field->is_valid( 'http://foo.bar.com' ) ); 166 $this->assertTrue( $field->is_valid( 'http://foo.bar.com/' ) ); 167 $this->assertTrue( $field->is_valid( 'http://foo.com/bar' ) ); 168 $this->assertTrue( $field->is_valid( 'http://foo.com/index.php' ) ); 169 $this->assertTrue( $field->is_valid( 'http://foo.com/?bar=baz' ) ); 170 171 $this->assertFalse( $field->is_valid( 'htp://foo.com' ) ); 172 $this->assertFalse( $field->is_valid( 'http:/foo.com' ) ); 173 $this->assertFalse( $field->is_valid( 'http//foo.com' ) ); 174 $this->assertFalse( $field->is_valid( 'http://foo' ) ); 175 $this->assertFalse( $field->is_valid( 'foo.com' ) ); 176 } 177 178 /** 158 179 * @group BP_XProfile_Field_Group_Type_Placeholder 159 180 */
Note:
See TracChangeset
for help on using the changeset viewer.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)