[ Index ]

PHP Cross Reference of BBPress

title

Body

[close]

/tests/phpunit/testcases/replies/functions/ -> reply.php (source)

   1  <?php
   2  
   3  /**
   4   * Tests for the reply component functions.
   5   *
   6   * @group replies
   7   * @group functions
   8   * @group reply
   9   */
  10  class BBP_Tests_Replies_Functions_Reply extends BBP_UnitTestCase {
  11  
  12      /**
  13       * @group canonical
  14       * @covers ::bbp_insert_reply
  15       */
  16  	public function test_bbp_insert_reply() {
  17  
  18          $f = $this->factory->forum->create();
  19  
  20          $t = $this->factory->topic->create( array(
  21              'post_parent' => $f,
  22              'topic_meta' => array(
  23                  'forum_id' => $f,
  24              ),
  25          ) );
  26  
  27          $r = $this->factory->reply->create( array(
  28              'post_title' => 'Reply To: Topic 1',
  29              'post_content' => 'Content of reply to Topic 1',
  30              'post_parent' => $t,
  31              'reply_meta' => array(
  32                  'forum_id' => $f,
  33                  'topic_id' => $t,
  34              ),
  35          ) );
  36  
  37          // Get the reply.
  38          $reply = bbp_get_reply( $r );
  39  
  40          remove_all_filters( 'bbp_get_reply_content' );
  41  
  42          // Reply post.
  43          $this->assertSame( 'Reply To: Topic 1', bbp_get_reply_title( $r ) );
  44          $this->assertSame( 'Content of reply to Topic 1', bbp_get_reply_content( $r ) );
  45          $this->assertSame( 'publish', bbp_get_reply_status( $r ) );
  46          $this->assertSame( $t, wp_get_post_parent_id( $r ) );
  47          $this->assertEquals( 'http://' . WP_TESTS_DOMAIN . '/?reply=' . $reply->post_name, $reply->guid );
  48  
  49          // Reply meta.
  50          $this->assertSame( $f, bbp_get_reply_forum_id( $r ) );
  51          $this->assertSame( $t, bbp_get_reply_topic_id( $r ) );
  52      }
  53  
  54      /**
  55       * @covers ::bbp_new_reply_handler
  56       * @todo   Implement test_bbp_new_reply_handler().
  57       */
  58  	public function test_bbp_new_reply_handler() {
  59          // Remove the following lines when you implement this test.
  60          $this->markTestIncomplete(
  61              'This test has not been implemented yet.'
  62          );
  63      }
  64  
  65      /**
  66       * @covers ::bbp_edit_reply_handler
  67       * @todo   Implement test_bbp_edit_reply_handler().
  68       */
  69  	public function test_bbp_edit_reply_handler() {
  70          // Remove the following lines when you implement this test.
  71          $this->markTestIncomplete(
  72              'This test has not been implemented yet.'
  73          );
  74      }
  75  
  76      /**
  77       * @covers ::bbp_update_reply
  78       * @todo   Implement test_bbp_update_reply().
  79       */
  80  	public function test_bbp_update_reply() {
  81          // Remove the following lines when you implement this test.
  82          $this->markTestIncomplete(
  83              'This test has not been implemented yet.'
  84          );
  85      }
  86  
  87      /**
  88       * @covers ::bbp_update_reply_walker
  89       * @todo   Implement test_bbp_update_reply_walker().
  90       */
  91  	public function test_bbp_update_reply_walker() {
  92          // Remove the following lines when you implement this test.
  93          $this->markTestIncomplete(
  94              'This test has not been implemented yet.'
  95          );
  96      }
  97  
  98      /**
  99       * @covers ::bbp_update_reply_forum_id
 100       */
 101  	public function test_bbp_update_reply_forum_id() {
 102          bbp_create_initial_content();
 103  
 104          $forum_id = 36;
 105          $topic_id = 37;
 106          $reply_id = 38;
 107  
 108          bbp_update_reply_forum_id( $reply_id, $forum_id);
 109  
 110          $reply_forum_id = bbp_get_reply_forum_id( $reply_id );
 111          $this->assertSame( 36, $reply_forum_id );
 112      }
 113  
 114      /**
 115       * @covers ::bbp_update_reply_topic_id
 116       */
 117  	public function test_bbp_update_reply_topic_id() {
 118          bbp_create_initial_content();
 119  
 120          $forum_id = 36;
 121          $topic_id = 37;
 122          $reply_id = 38;
 123  
 124          bbp_update_reply_topic_id( $reply_id, $topic_id);
 125  
 126          $reply_topic_id = bbp_get_reply_topic_id( $reply_id );
 127          $this->assertSame( 37, $reply_topic_id );
 128      }
 129  
 130      /**
 131       * @covers ::bbp_update_reply_to
 132       * @todo   Implement test_bbp_update_reply_to().
 133       */
 134  	public function test_bbp_update_reply_to() {
 135          // Remove the following lines when you implement this test.
 136          $this->markTestIncomplete(
 137              'This test has not been implemented yet.'
 138          );
 139      }
 140  
 141      /**
 142       * @covers ::bbp_get_reply_ancestors
 143       * @todo   Implement test_bbp_get_reply_ancestors().
 144       */
 145  	public function test_bbp_get_reply_ancestors() {
 146          // Remove the following lines when you implement this test.
 147          $this->markTestIncomplete(
 148              'This test has not been implemented yet.'
 149          );
 150      }
 151  
 152      /**
 153       * @covers ::bbp_update_reply_revision_log
 154       * @todo   Implement test_bbp_update_reply_revision_log().
 155       */
 156  	public function test_bbp_update_reply_revision_log() {
 157          // Remove the following lines when you implement this test.
 158          $this->markTestIncomplete(
 159              'This test has not been implemented yet.'
 160          );
 161      }
 162  
 163      /**
 164       * @covers ::bbp_move_reply_handler
 165       * @todo   Implement test_bbp_move_reply_handler().
 166       */
 167  	public function test_bbp_move_reply_handler() {
 168          // Remove the following lines when you implement this test.
 169          $this->markTestIncomplete(
 170              'This test has not been implemented yet.'
 171          );
 172      }
 173  
 174      /**
 175       * @covers ::bbp_move_reply_count
 176       * @todo   Implement test_bbp_move_reply_count().
 177       */
 178  	public function test_bbp_move_reply_count() {
 179          // Remove the following lines when you implement this test.
 180          $this->markTestIncomplete(
 181              'This test has not been implemented yet.'
 182          );
 183      }
 184  
 185      /**
 186       * @covers ::bbp_toggle_reply_handler
 187       * @todo   Implement test_bbp_toggle_reply_handler().
 188       */
 189  	public function test_bbp_toggle_reply_handler() {
 190          // Remove the following lines when you implement this test.
 191          $this->markTestIncomplete(
 192              'This test has not been implemented yet.'
 193          );
 194      }
 195  
 196      /**
 197       * @covers ::bbp_delete_reply
 198       * @todo   Implement test_bbp_delete_reply().
 199       */
 200  	public function test_bbp_delete_reply() {
 201          // Remove the following lines when you implement this test.
 202          $this->markTestIncomplete(
 203              'This test has not been implemented yet.'
 204          );
 205      }
 206  
 207      /**
 208       * @covers ::bbp_trash_reply
 209       * @todo   Implement test_bbp_trash_reply().
 210       */
 211  	public function test_bbp_trash_reply() {
 212          // Remove the following lines when you implement this test.
 213          $this->markTestIncomplete(
 214              'This test has not been implemented yet.'
 215          );
 216      }
 217  
 218      /**
 219       * @covers ::bbp_untrash_reply
 220       * @todo   Implement test_bbp_untrash_reply().
 221       */
 222  	public function test_bbp_untrash_reply() {
 223          // Remove the following lines when you implement this test.
 224          $this->markTestIncomplete(
 225              'This test has not been implemented yet.'
 226          );
 227      }
 228  
 229      /**
 230       * @covers ::bbp_deleted_reply
 231       * @todo   Implement test_bbp_deleted_reply().
 232       */
 233  	public function test_bbp_deleted_reply() {
 234          // Remove the following lines when you implement this test.
 235          $this->markTestIncomplete(
 236              'This test has not been implemented yet.'
 237          );
 238      }
 239  
 240      /**
 241       * @covers ::bbp_trashed_reply
 242       * @todo   Implement test_bbp_trashed_reply().
 243       */
 244  	public function test_bbp_trashed_reply() {
 245          // Remove the following lines when you implement this test.
 246          $this->markTestIncomplete(
 247              'This test has not been implemented yet.'
 248          );
 249      }
 250  
 251      /**
 252       * @covers ::bbp_untrashed_reply
 253       * @todo   Implement test_bbp_untrashed_reply().
 254       */
 255  	public function test_bbp_untrashed_reply() {
 256          // Remove the following lines when you implement this test.
 257          $this->markTestIncomplete(
 258              'This test has not been implemented yet.'
 259          );
 260      }
 261  
 262      /**
 263       * @covers ::bbp_get_replies_per_page
 264       * @todo   Implement test_bbp_get_replies_per_page().
 265       */
 266  	public function test_bbp_get_replies_per_page() {
 267          // Remove the following lines when you implement this test.
 268          $this->markTestIncomplete(
 269              'This test has not been implemented yet.'
 270          );
 271      }
 272  
 273      /**
 274       * @covers ::bbp_get_replies_per_rss_page
 275       * @todo   Implement test_bbp_get_replies_per_rss_page().
 276       */
 277  	public function test_bbp_get_replies_per_rss_page() {
 278          // Remove the following lines when you implement this test.
 279          $this->markTestIncomplete(
 280              'This test has not been implemented yet.'
 281          );
 282      }
 283  
 284      /**
 285       * @covers ::bbp_reply_content_autoembed
 286       * @todo   Implement test_bbp_reply_content_autoembed().
 287       */
 288  	public function test_bbp_reply_content_autoembed() {
 289          // Remove the following lines when you implement this test.
 290          $this->markTestIncomplete(
 291              'This test has not been implemented yet.'
 292          );
 293      }
 294  
 295      /**
 296       * @covers ::_bbp_has_replies_where
 297       * @todo   Implement test_bbp_has_replies_where().
 298       */
 299  	public function test_bbp_has_replies_where() {
 300          // Remove the following lines when you implement this test.
 301          $this->markTestIncomplete(
 302              'This test has not been implemented yet.'
 303          );
 304      }
 305  
 306      /**
 307       * @covers ::bbp_display_replies_feed_rss2
 308       * @todo   Implement test_bbp_display_replies_feed_rss2().
 309       */
 310  	public function test_bbp_display_replies_feed_rss2() {
 311          // Remove the following lines when you implement this test.
 312          $this->markTestIncomplete(
 313              'This test has not been implemented yet.'
 314          );
 315      }
 316  
 317      /**
 318       * @covers ::bbp_check_reply_edit
 319       * @todo   Implement test_bbp_check_reply_edit().
 320       */
 321  	public function test_bbp_check_reply_edit() {
 322          // Remove the following lines when you implement this test.
 323          $this->markTestIncomplete(
 324              'This test has not been implemented yet.'
 325          );
 326      }
 327  
 328      /**
 329       * @covers ::bbp_update_reply_position
 330       * @todo   Implement test_bbp_update_reply_position().
 331       */
 332  	public function test_bbp_update_reply_position() {
 333          // Remove the following lines when you implement this test.
 334          $this->markTestIncomplete(
 335              'This test has not been implemented yet.'
 336          );
 337      }
 338  
 339      /**
 340       * @covers ::bbp_get_reply_position_raw
 341       * @todo   Implement test_bbp_get_reply_position_raw().
 342       */
 343  	public function test_bbp_get_reply_position_raw() {
 344          // Remove the following lines when you implement this test.
 345          $this->markTestIncomplete(
 346              'This test has not been implemented yet.'
 347          );
 348      }
 349  
 350      /**
 351       * @covers ::bbp_list_replies
 352       * @todo   Implement test_bbp_list_replies().
 353       */
 354  	public function test_bbp_list_replies() {
 355          // Remove the following lines when you implement this test.
 356          $this->markTestIncomplete(
 357              'This test has not been implemented yet.'
 358          );
 359      }
 360  
 361      /**
 362       * @covers ::bbp_validate_reply_to
 363       * @todo   Implement test_bbp_validate_reply_to().
 364       */
 365  	public function test_bbp_validate_reply_to() {
 366          // Remove the following lines when you implement this test.
 367          $this->markTestIncomplete(
 368              'This test has not been implemented yet.'
 369          );
 370      }
 371  }


Generated: Sat Dec 21 01:00:52 2024 Cross-referenced by PHPXref 0.7.1