Changeset 6802
- Timestamp:
- 04/22/2018 08:52:38 PM (8 years ago)
- Location:
- trunk/tests/phpunit/testcases
- Files:
-
- 2 edited
-
replies/template/reply.php (modified) (2 diffs)
-
topics/template/links.php (modified) (9 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/testcases/replies/template/reply.php
r6721 r6802 116 116 117 117 // 1st reply is on the first page, 3 replies and 1 topic per page. 118 $reply_url = bbp_get_topic_permalink( $t ) . ' /#post-' . bbp_get_reply_id( $r[0] );118 $reply_url = bbp_get_topic_permalink( $t ) . '#post-' . bbp_get_reply_id( $r[0] ); 119 119 $this->assertSame( $reply_url, bbp_get_reply_url( $r[0] ) ); 120 120 121 121 // 2nd reply is on the first page, 3 replies and 1 topic per page. 122 $reply_url = bbp_get_topic_permalink( $t ) . ' /#post-' . bbp_get_reply_id( $r[1] );122 $reply_url = bbp_get_topic_permalink( $t ) . '#post-' . bbp_get_reply_id( $r[1] ); 123 123 $this->assertSame( $reply_url, bbp_get_reply_url( $r[1] ) ); 124 124 125 125 // 3rd reply is on the first page, 3 replies and 1 topic per page. 126 $reply_url = bbp_get_topic_permalink( $t ) . ' /#post-' . bbp_get_reply_id( $r[2] );126 $reply_url = bbp_get_topic_permalink( $t ) . '#post-' . bbp_get_reply_id( $r[2] ); 127 127 $this->assertSame( $reply_url, bbp_get_reply_url( $r[2] ) ); 128 128 … … 150 150 151 151 // 1st reply is on the first page, 2 replies and 1 topic per first page. 152 $reply_url = bbp_get_topic_permalink( $t ) . ' /#post-' . bbp_get_reply_id( $r[0] );152 $reply_url = bbp_get_topic_permalink( $t ) . '#post-' . bbp_get_reply_id( $r[0] ); 153 153 $this->assertSame( $reply_url, bbp_get_reply_url( $r[0] ) ); 154 154 155 155 // 2nd reply is on the first page, 2 replies and 1 topic per first page. 156 $reply_url = bbp_get_topic_permalink( $t ) . ' /#post-' . bbp_get_reply_id( $r[1] );156 $reply_url = bbp_get_topic_permalink( $t ) . '#post-' . bbp_get_reply_id( $r[1] ); 157 157 $this->assertSame( $reply_url, bbp_get_reply_url( $r[1] ) ); 158 158 -
trunk/tests/phpunit/testcases/topics/template/links.php
r5947 r6802 72 72 73 73 $link = bbp_get_topic_freshness_link( $t ); 74 $this->assertSame( '<a href="http://' . WP_TESTS_DOMAIN . '/?topic=topic-1 /#post-' . bbp_get_reply_id( $r1 ) . '" title="Reply To: ' . bbp_get_topic_title( $t ) . '">3 days, 8 hours ago</a>', $link );74 $this->assertSame( '<a href="http://' . WP_TESTS_DOMAIN . '/?topic=topic-1#post-' . bbp_get_reply_id( $r1 ) . '" title="Reply To: ' . bbp_get_topic_title( $t ) . '">3 days, 8 hours ago</a>', $link ); 75 75 76 76 $r2 = $this->factory->reply->create( array( … … 84 84 85 85 $link = bbp_get_topic_freshness_link( $t ); 86 $this->assertSame( '<a href="http://' . WP_TESTS_DOMAIN . '/?topic=topic-1 /#post-' . bbp_get_reply_id( $r2 ) . '" title="Reply To: ' . bbp_get_topic_title( $t ) . '">2 days, 12 hours ago</a>', $link );86 $this->assertSame( '<a href="http://' . WP_TESTS_DOMAIN . '/?topic=topic-1#post-' . bbp_get_reply_id( $r2 ) . '" title="Reply To: ' . bbp_get_topic_title( $t ) . '">2 days, 12 hours ago</a>', $link ); 87 87 } 88 88 … … 127 127 128 128 $link = bbp_get_topic_freshness_link( $t ); 129 $this->assertSame( '<a href="http://' . WP_TESTS_DOMAIN . '/?topic=topic-1 /#post-' . bbp_get_reply_id( $r1 ) . '" title="Reply To: ' . bbp_get_topic_title( $t ) . '">18 hours ago</a>', $link );129 $this->assertSame( '<a href="http://' . WP_TESTS_DOMAIN . '/?topic=topic-1#post-' . bbp_get_reply_id( $r1 ) . '" title="Reply To: ' . bbp_get_topic_title( $t ) . '">18 hours ago</a>', $link ); 130 130 131 131 $r2 = $this->factory->reply->create( array( … … 139 139 140 140 $link = bbp_get_topic_freshness_link( $t ); 141 $this->assertSame( '<a href="http://' . WP_TESTS_DOMAIN . '/?topic=topic-1 /#post-' . bbp_get_reply_id( $r2 ) . '" title="Reply To: ' . bbp_get_topic_title( $t ) . '">16 hours ago</a>', $link );141 $this->assertSame( '<a href="http://' . WP_TESTS_DOMAIN . '/?topic=topic-1#post-' . bbp_get_reply_id( $r2 ) . '" title="Reply To: ' . bbp_get_topic_title( $t ) . '">16 hours ago</a>', $link ); 142 142 143 143 bbp_spam_reply( $r2 ); 144 144 145 145 $link = bbp_get_topic_freshness_link( $t ); 146 $this->assertSame( '<a href="http://' . WP_TESTS_DOMAIN . '/?topic=topic-1 /#post-' . bbp_get_reply_id( $r1 ) . '" title="Reply To: ' . bbp_get_topic_title( $t ) . '">18 hours ago</a>', $link );146 $this->assertSame( '<a href="http://' . WP_TESTS_DOMAIN . '/?topic=topic-1#post-' . bbp_get_reply_id( $r1 ) . '" title="Reply To: ' . bbp_get_topic_title( $t ) . '">18 hours ago</a>', $link ); 147 147 148 148 $r3 = $this->factory->reply->create( array( … … 156 156 157 157 $link = bbp_get_topic_freshness_link( $t ); 158 $this->assertSame( '<a href="http://' . WP_TESTS_DOMAIN . '/?topic=topic-1 /#post-' . bbp_get_reply_id( $r3 ) . '" title="Reply To: ' . bbp_get_topic_title( $t ) . '">14 hours ago</a>', $link );158 $this->assertSame( '<a href="http://' . WP_TESTS_DOMAIN . '/?topic=topic-1#post-' . bbp_get_reply_id( $r3 ) . '" title="Reply To: ' . bbp_get_topic_title( $t ) . '">14 hours ago</a>', $link ); 159 159 160 160 // Todo: Use bbp_trash_reply() and not wp_trash_post() … … 162 162 163 163 $link = bbp_get_topic_freshness_link( $t ); 164 $this->assertSame( '<a href="http://' . WP_TESTS_DOMAIN . '/?topic=topic-1 /#post-' . bbp_get_reply_id( $r1 ) . '" title="Reply To: ' . bbp_get_topic_title( $t ) . '">18 hours ago</a>', $link );164 $this->assertSame( '<a href="http://' . WP_TESTS_DOMAIN . '/?topic=topic-1#post-' . bbp_get_reply_id( $r1 ) . '" title="Reply To: ' . bbp_get_topic_title( $t ) . '">18 hours ago</a>', $link ); 165 165 166 166 $r4 = $this->factory->reply->create( array( … … 174 174 175 175 $link = bbp_get_topic_freshness_link( $t ); 176 $this->assertSame( '<a href="http://' . WP_TESTS_DOMAIN . '/?topic=topic-1 /#post-' . bbp_get_reply_id( $r4 ) . '" title="Reply To: ' . bbp_get_topic_title( $t ) . '">12 hours ago</a>', $link );176 $this->assertSame( '<a href="http://' . WP_TESTS_DOMAIN . '/?topic=topic-1#post-' . bbp_get_reply_id( $r4 ) . '" title="Reply To: ' . bbp_get_topic_title( $t ) . '">12 hours ago</a>', $link ); 177 177 178 178 bbp_unapprove_reply( $r4 ); 179 179 180 180 $link = bbp_get_topic_freshness_link( $t ); 181 $this->assertSame( '<a href="http://' . WP_TESTS_DOMAIN . '/?topic=topic-1 /#post-' . bbp_get_reply_id( $r1 ) . '" title="Reply To: ' . bbp_get_topic_title( $t ) . '">18 hours ago</a>', $link );181 $this->assertSame( '<a href="http://' . WP_TESTS_DOMAIN . '/?topic=topic-1#post-' . bbp_get_reply_id( $r1 ) . '" title="Reply To: ' . bbp_get_topic_title( $t ) . '">18 hours ago</a>', $link ); 182 182 183 183 bbp_unspam_reply( $r2 ); 184 184 185 185 $link = bbp_get_topic_freshness_link( $t ); 186 $this->assertSame( '<a href="http://' . WP_TESTS_DOMAIN . '/?topic=topic-1 /#post-' . bbp_get_reply_id( $r2 ) . '" title="Reply To: ' . bbp_get_topic_title( $t ) . '">16 hours ago</a>', $link );186 $this->assertSame( '<a href="http://' . WP_TESTS_DOMAIN . '/?topic=topic-1#post-' . bbp_get_reply_id( $r2 ) . '" title="Reply To: ' . bbp_get_topic_title( $t ) . '">16 hours ago</a>', $link ); 187 187 188 188 // Todo: Use bbp_untrash_reply() and not wp_untrash_post() … … 190 190 191 191 $link = bbp_get_topic_freshness_link( $t ); 192 $this->assertSame( '<a href="http://' . WP_TESTS_DOMAIN . '/?topic=topic-1 /#post-' . bbp_get_reply_id( $r3 ) . '" title="Reply To: ' . bbp_get_topic_title( $t ) . '">14 hours ago</a>', $link );192 $this->assertSame( '<a href="http://' . WP_TESTS_DOMAIN . '/?topic=topic-1#post-' . bbp_get_reply_id( $r3 ) . '" title="Reply To: ' . bbp_get_topic_title( $t ) . '">14 hours ago</a>', $link ); 193 193 194 194 bbp_approve_reply( $r4 ); 195 195 196 196 $link = bbp_get_topic_freshness_link( $t ); 197 $this->assertSame( '<a href="http://' . WP_TESTS_DOMAIN . '/?topic=topic-1 /#post-' . bbp_get_reply_id( $r4 ) . '" title="Reply To: ' . bbp_get_topic_title( $t ) . '">12 hours ago</a>', $link );197 $this->assertSame( '<a href="http://' . WP_TESTS_DOMAIN . '/?topic=topic-1#post-' . bbp_get_reply_id( $r4 ) . '" title="Reply To: ' . bbp_get_topic_title( $t ) . '">12 hours ago</a>', $link ); 198 198 199 199 $r5 = $this->factory->reply->create( array( … … 207 207 208 208 $link = bbp_get_topic_freshness_link( $t ); 209 $this->assertSame( '<a href="http://' . WP_TESTS_DOMAIN . '/?topic=topic-1 /#post-' . bbp_get_reply_id( $r5 ) . '" title="Reply To: ' . bbp_get_topic_title( $t ) . '">10 hours ago</a>', $link );209 $this->assertSame( '<a href="http://' . WP_TESTS_DOMAIN . '/?topic=topic-1#post-' . bbp_get_reply_id( $r5 ) . '" title="Reply To: ' . bbp_get_topic_title( $t ) . '">10 hours ago</a>', $link ); 210 210 } 211 211
Note: See TracChangeset
for help on using the changeset viewer.