Changeset 11144 for trunk/tests/phpunit/testcases/groups/types.php
- Timestamp:
- 09/21/2016 10:40:12 PM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/testcases/groups/types.php
r11142 r11144 265 265 } 266 266 267 public function test_bp_groups_register_group_type_show_in_list_true_when_show_in_create_screen_true() { 268 $object = bp_groups_register_group_type( 'foo', array( 269 'show_in_create_screen' => true, 270 ) ); 271 272 $this->assertTrue( $object->show_in_list ); 273 } 274 275 public function test_bp_groups_register_group_type_show_in_list_false_when_show_in_create_screen_false() { 276 $object = bp_groups_register_group_type( 'foo', array( 277 'show_in_create_screen' => false, 278 ) ); 279 280 $this->assertFalse( $object->show_in_list ); 281 } 282 283 public function test_bp_groups_register_group_type_show_in_list_false_and_show_in_create_screen_true() { 284 $object = bp_groups_register_group_type( 'foo', array( 285 'show_in_create_screen' => true, 286 'show_in_list' => false, 287 ) ); 288 289 $this->assertFalse( $object->show_in_list ); 290 } 291 292 public function test_bp_groups_set_group_type_should_remove_types_when_passing_an_empty_value() { 293 $g = $this->factory->group->create( array( 'creator_id' => self::$u1 ) ); 294 bp_groups_register_group_type( 'foo' ); 295 bp_groups_set_group_type( $g, 'foo' ); 296 297 // Make sure it's set up. 298 $this->assertSame( 'foo', bp_groups_get_group_type( $g ) ); 299 300 $this->assertSame( array(), bp_groups_set_group_type( $g, '' ) ); 301 $this->assertFalse( bp_groups_get_group_type( $g ) ); 302 } 303 267 304 public function test_bp_groups_set_group_type_should_set_multiple_types_when_passing_array_of_types() { 268 305 $g = $this->factory->group->create( array( 'creator_id' => self::$u1 ) );
Note: See TracChangeset
for help on using the changeset viewer.