Changeset 7879 for trunk/tests/testcases/xprofile/functions.php
- Timestamp:
- 02/14/2014 01:59:32 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/testcases/xprofile/functions.php
r7878 r7879 280 280 * @group bp_xprofile_get_meta 281 281 */ 282 public function test_bp_xprofile_get_meta_single_true() { 283 $g = $this->factory->xprofile_group->create(); 284 bp_xprofile_add_meta( $g, 'group', 'foo', 'bar' ); 285 bp_xprofile_add_meta( $g, 'group', 'foo', 'baz' ); 286 $this->assertSame( 'bar', bp_xprofile_get_meta( $g, 'group', 'foo' ) ); // default is true 287 $this->assertSame( 'bar', bp_xprofile_get_meta( $g, 'group', 'foo', true ) ); 288 } 289 290 /** 291 * @group xprofilemeta 292 * @group bp_xprofile_get_meta 293 */ 294 public function test_bp_xprofile_get_meta_single_false() { 295 $g = $this->factory->xprofile_group->create(); 296 bp_xprofile_add_meta( $g, 'group', 'foo', 'bar' ); 297 bp_xprofile_add_meta( $g, 'group', 'foo', 'baz' ); 298 $this->assertSame( array( 'bar', 'baz' ), bp_xprofile_get_meta( $g, 'group', 'foo', false ) ); 299 } 300 301 /** 302 * @group xprofilemeta 303 * @group bp_xprofile_get_meta 304 */ 282 305 public function test_bp_xprofile_get_meta_no_meta_key_no_results() { 283 306 $g = $this->factory->xprofile_group->create();
Note: See TracChangeset
for help on using the changeset viewer.