Changeset 5883
- Timestamp:
- 07/28/2015 10:27:08 AM (11 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
-
src/includes/core/update.php (modified) (4 diffs)
-
tests/phpunit/testcases/core/update.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/includes/core/update.php
r5843 r5883 193 193 194 194 // Use the same time for each post 195 $current_time = current_time( 'mysql' ); 195 $current_time = time(); 196 $forum_time = date( 'Y-m-d H:i:s', $current_time - 60 * 60 * 80 ); 197 $topic_time = date( 'Y-m-d H:i:s', $current_time - 60 * 60 * 60 ); 198 $reply_time = date( 'Y-m-d H:i:s', $current_time - 60 * 60 * 40 ); 196 199 197 200 // Create the initial forum … … 201 204 'post_title' => $r['forum_title'], 202 205 'post_content' => $r['forum_content'], 203 'post_date' => $ current_time206 'post_date' => $forum_time 204 207 ) ); 205 208 … … 210 213 'post_title' => $r['topic_title'], 211 214 'post_content' => $r['topic_content'], 212 'post_date' => $ current_time215 'post_date' => $topic_time 213 216 ), 214 217 array( … … 222 225 'post_parent' => $topic_id, 223 226 'post_content' => $r['reply_content'], 224 'post_date' => $ current_time227 'post_date' => $reply_time 225 228 ), 226 229 array( -
trunk/tests/phpunit/testcases/core/update.php
r5801 r5883 88 88 $topic_id = bbp_get_forum_last_topic_id( $forum_id ); 89 89 $reply_id = bbp_get_forum_last_reply_id( $forum_id ); 90 $now = 'right now';91 90 92 91 // Forum post … … 130 129 $this->assertSame( 'Reply To: Hello World!', bbp_get_forum_last_reply_title( $forum_id ) ); 131 130 $this->assertSame( $reply_id, bbp_get_forum_last_active_id( $forum_id ) ); 132 $this->assertSame( $now, bbp_get_forum_last_active_time( $forum_id ) );131 $this->assertSame( '1 day, 16 hours ago', bbp_get_forum_last_active_time( $forum_id ) ); 133 132 134 133 // Topic meta … … 140 139 $this->assertSame( $reply_id, bbp_get_topic_last_reply_id( $topic_id ) ); 141 140 $this->assertSame( $reply_id, bbp_get_topic_last_active_id( $topic_id ) ); 142 $this->assertSame( $now, bbp_get_topic_last_active_time( $topic_id ) );141 $this->assertSame( '1 day, 16 hours ago', bbp_get_topic_last_active_time( $topic_id ) ); 143 142 144 143 // Reply Meta
Note:
See TracChangeset
for help on using the changeset viewer.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)