Changeset 5962 for trunk/tests/phpunit/testcases/forums/template/forum.php
- Timestamp:
- 12/15/2015 12:40:13 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/testcases/forums/template/forum.php
r5947 r5962 42 42 } 43 43 44 $f = $this->factory->forum->create( array( 45 'post_title' => 'Forum 1', 44 // Public category. 45 $c = $this->factory->forum->create( array( 46 'post_title' => 'Public Category', 47 ) ); 48 49 $category = bbp_get_forum_permalink( $c ); 50 $this->assertSame( 'http://' . WP_TESTS_DOMAIN . '/?forum=public-category', $category ); 51 52 // Public forum of public category. 53 $f = $this->factory->forum->create( array( 54 'post_title' => 'Public Forum', 55 'post_parent' => $c, 46 56 ) ); 47 57 … … 51 61 52 62 $forum = bbp_get_forum_permalink( $f ); 53 $this->assertSame( 'http://' . WP_TESTS_DOMAIN . '/?forum=forum-1', $forum ); 63 $this->assertSame( 'http://' . WP_TESTS_DOMAIN . '/?forum=public-category/public-forum', $forum ); 64 65 // Private category. 66 $c = $this->factory->forum->create( array( 67 'post_title' => 'Private Category', 68 ) ); 69 70 $category = bbp_get_forum_permalink( $c ); 71 72 $forum = bbp_get_forum_permalink( $f ); 73 $this->assertSame( 'http://' . WP_TESTS_DOMAIN . '/?forum=private-category', $category ); 74 75 // Private forum of private category. 76 $f = $this->factory->forum->create( array( 77 'post_title' => 'Private Forum', 78 'post_parent' => $c, 79 ) ); 80 81 bbp_privatize_forum( $c ); 82 $forum = bbp_get_forum_permalink( $f ); 83 $this->assertSame( 'http://' . WP_TESTS_DOMAIN . '/?forum=private-category/private-forum', $forum ); 84 85 // Hidden category. 86 $c = $this->factory->forum->create( array( 87 'post_title' => 'Hidden Category', 88 ) ); 89 90 bbp_hide_forum( $c ); 91 $category = bbp_get_forum_permalink( $c ); 92 $this->assertSame( 'http://' . WP_TESTS_DOMAIN . '/?forum=hidden-category', $category ); 93 94 // Hidden forum of hidden category. 95 $f = $this->factory->forum->create( array( 96 'post_title' => 'Hidden Forum', 97 'post_parent' => $c, 98 ) ); 99 100 $forum = bbp_get_forum_permalink( $f ); 101 $this->assertSame( 'http://' . WP_TESTS_DOMAIN . '/?forum=hidden-category/hidden-forum', $forum ); 54 102 } 55 103
Note: See TracChangeset
for help on using the changeset viewer.