Changeset 11405 for trunk/tests/phpunit/testcases/routing/groups.php
- Timestamp:
- 01/31/2017 08:31:10 PM (9 years ago)
- File:
-
- 1 edited
-
trunk/tests/phpunit/testcases/routing/groups.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/testcases/routing/groups.php
r9819 r11405 28 28 $this->assertTrue( bp_is_user_groups() && bp_is_current_action( 'invites' ) ); 29 29 } 30 31 /** 32 * @group group_types 33 */ 34 public function test_group_directory_with_type() { 35 bp_groups_register_group_type( 'foo' ); 36 $this->go_to( bp_get_groups_directory_permalink() . 'type/foo/' ); 37 $this->assertTrue( bp_is_groups_component() && ! bp_is_group() && bp_is_current_action( bp_get_groups_group_type_base() ) && bp_is_action_variable( 'foo', 0 ) ); 38 } 39 40 /** 41 * @group group_types 42 */ 43 public function test_group_directory_with_type_that_has_custom_directory_slug() { 44 bp_groups_register_group_type( 'foo', array( 'has_directory' => 'foos' ) ); 45 $this->go_to( bp_get_groups_directory_permalink() . 'type/foos/' ); 46 $this->assertTrue( bp_is_groups_component() && ! bp_is_group() && bp_is_current_action( bp_get_groups_group_type_base() ) && bp_is_action_variable( 'foos', 0 ) ); 47 } 48 49 /** 50 * @group group_types 51 */ 52 public function test_group_directory_should_404_for_group_types_that_have_no_directory() { 53 bp_register_member_type( 'foo', array( 'has_directory' => false ) ); 54 $this->go_to( bp_get_members_directory_permalink() . 'type/foo/' ); 55 $this->assertTrue( is_404() ); 56 } 57 58 /** 59 * @group group_types 60 */ 61 public function test_group_directory_should_404_for_invalid_group_types() { 62 $this->go_to( bp_get_members_directory_permalink() . 'type/foo/' ); 63 $this->assertTrue( is_404() ); 64 } 30 65 }
Note: See TracChangeset
for help on using the changeset viewer.