[ Index ]

PHP Cross Reference of BBPress

title

Body

[close]

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

   1  <?php
   2  
   3  /**
   4   * Tests for the user component functions.
   5   *
   6   * @group users
   7   * @group functions
   8   */
   9   class BBP_Tests_Users_Functions extends BBP_UnitTestCase {
  10  
  11      /**
  12       * @covers ::bbp_redirect_login
  13       * @todo   Implement test_bbp_redirect_login().
  14       */
  15  	public function test_bbp_redirect_login() {
  16          // Remove the following lines when you implement this test.
  17          $this->markTestIncomplete(
  18              'This test has not been implemented yet.'
  19          );
  20      }
  21  
  22      /**
  23       * @covers ::bbp_is_anonymous
  24       * @todo   Implement test_bbp_is_anonymous().
  25       */
  26  	public function test_bbp_is_anonymous() {
  27          // Remove the following lines when you implement this test.
  28          $this->markTestIncomplete(
  29              'This test has not been implemented yet.'
  30          );
  31      }
  32  
  33      /**
  34       * @covers ::bbp_current_anonymous_user_data
  35       * @todo   Implement test_bbp_current_anonymous_user_data().
  36       */
  37  	public function test_bbp_current_anonymous_user_data() {
  38          // Remove the following lines when you implement this test.
  39          $this->markTestIncomplete(
  40              'This test has not been implemented yet.'
  41          );
  42      }
  43  
  44      /**
  45       * @covers ::bbp_get_current_anonymous_user_data
  46       * @todo   Implement test_bbp_get_current_anonymous_user_data().
  47       */
  48  	public function test_bbp_get_current_anonymous_user_data() {
  49          // Remove the following lines when you implement this test.
  50          $this->markTestIncomplete(
  51              'This test has not been implemented yet.'
  52          );
  53      }
  54  
  55      /**
  56       * @covers ::bbp_set_current_anonymous_user_data
  57       * @todo   Implement test_bbp_set_current_anonymous_user_data().
  58       */
  59  	public function test_bbp_set_current_anonymous_user_data() {
  60          // Remove the following lines when you implement this test.
  61          $this->markTestIncomplete(
  62              'This test has not been implemented yet.'
  63          );
  64      }
  65  
  66      /**
  67       * @covers ::bbp_current_author_ip
  68       * @todo   Implement test_bbp_current_author_ip().
  69       */
  70  	public function test_bbp_current_author_ip() {
  71          // Remove the following lines when you implement this test.
  72          $this->markTestIncomplete(
  73              'This test has not been implemented yet.'
  74          );
  75      }
  76  
  77      /**
  78       * @covers ::bbp_current_author_ua
  79       * @todo   Implement test_bbp_current_author_ua().
  80       */
  81  	public function test_bbp_current_author_ua() {
  82          // Remove the following lines when you implement this test.
  83          $this->markTestIncomplete(
  84              'This test has not been implemented yet.'
  85          );
  86      }
  87  
  88      /**
  89       * @covers ::bbp_add_user_to_object
  90       */
  91  	public function test_bbp_add_user_to_object() {
  92          $u = $this->factory->user->create_many( 3 );
  93          $t = $this->factory->topic->create();
  94  
  95          // Add object terms.
  96          foreach ( $u as $k => $v ) {
  97              bbp_add_user_to_object( $t, $v, '_bbp_moderator' );
  98          }
  99  
 100          $r = get_metadata( 'post', $t, '_bbp_moderator', false );
 101  
 102          $this->assertCount( 3, $r );
 103      }
 104  
 105      /**
 106       * @covers ::bbp_remove_user_from_object
 107       */
 108  	public function test_bbp_remove_user_from_object() {
 109          $u = $this->factory->user->create();
 110          $t = $this->factory->topic->create();
 111  
 112          // Add object terms.
 113          add_metadata( 'post', $t, '_bbp_moderator', $u, false );
 114  
 115          $r = get_metadata( 'post', $t, '_bbp_moderator', false );
 116  
 117          $this->assertCount( 1, $r );
 118  
 119          $r = bbp_remove_user_from_object( $t, $u, '_bbp_moderator' );
 120  
 121          $this->assertTrue( $r );
 122  
 123          $r = get_metadata( 'post', $t, '_bbp_moderator', false );
 124  
 125          $this->assertCount( 0, $r );
 126      }
 127  
 128      /**
 129       * @covers ::bbp_is_object_of_user
 130       */
 131  	public function test_bbp_is_object_of_user() {
 132          $u = $this->factory->user->create();
 133          $t = $this->factory->topic->create();
 134  
 135          $r = bbp_is_object_of_user( $t, $u, '_bbp_moderator' );
 136  
 137          $this->assertFalse( $r );
 138  
 139          // Add user id.
 140          add_metadata( 'post', $t, '_bbp_moderator', $u, false );
 141  
 142          $r = bbp_is_object_of_user( $t, $u, '_bbp_moderator' );
 143  
 144          $this->assertTrue( $r );
 145      }
 146  
 147       /**
 148       * @covers ::bbp_edit_user_handler
 149       * @todo   Implement test_bbp_edit_user_handler().
 150       */
 151  	public function test_bbp_edit_user_handler() {
 152          // Remove the following lines when you implement this test.
 153          $this->markTestIncomplete(
 154              'This test has not been implemented yet.'
 155          );
 156      }
 157  
 158      /**
 159       * @covers ::bbp_user_email_change_handler
 160       * @todo   Implement test_bbp_user_email_change_handler().
 161       */
 162  	public function test_bbp_user_email_change_handler() {
 163          // Remove the following lines when you implement this test.
 164          $this->markTestIncomplete(
 165              'This test has not been implemented yet.'
 166          );
 167      }
 168  
 169      /**
 170       * @covers ::bbp_edit_user_email_send_notification
 171       * @todo   Implement test_bbp_edit_user_email_send_notification().
 172       */
 173  	public function test_bbp_edit_user_email_send_notification() {
 174          // Remove the following lines when you implement this test.
 175          $this->markTestIncomplete(
 176              'This test has not been implemented yet.'
 177          );
 178      }
 179  
 180      /**
 181       * @covers ::bbp_user_edit_after
 182       * @todo   Implement test_bbp_user_edit_after().
 183       */
 184  	public function test_bbp_user_edit_after() {
 185          // Remove the following lines when you implement this test.
 186          $this->markTestIncomplete(
 187              'This test has not been implemented yet.'
 188          );
 189      }
 190  
 191      /**
 192       * @covers ::bbp_check_user_edit
 193       * @todo   Implement test_bbp_check_user_edit().
 194       */
 195  	public function test_bbp_check_user_edit() {
 196          // Remove the following lines when you implement this test.
 197          $this->markTestIncomplete(
 198              'This test has not been implemented yet.'
 199          );
 200      }
 201  
 202      /**
 203       * @covers ::bbp_forum_enforce_blocked
 204       * @todo   Implement test_bbp_forum_enforce_blocked().
 205       */
 206  	public function test_bbp_forum_enforce_blocked() {
 207          // Remove the following lines when you implement this test.
 208          $this->markTestIncomplete(
 209              'This test has not been implemented yet.'
 210          );
 211      }
 212  
 213      /**
 214       * @covers ::bbp_sanitize_displayed_user_field
 215       * @todo   Implement test_bbp_sanitize_displayed_user_field().
 216       */
 217  	public function test_bbp_sanitize_displayed_user_field() {
 218          // Remove the following lines when you implement this test.
 219          $this->markTestIncomplete(
 220              'This test has not been implemented yet.'
 221          );
 222      }
 223  
 224      /**
 225       * @covers ::bbp_user_maybe_convert_pass
 226       * @todo   Implement test_bbp_user_maybe_convert_pass().
 227       */
 228  	public function test_bbp_user_maybe_convert_pass() {
 229          // Remove the following lines when you implement this test.
 230          $this->markTestIncomplete(
 231              'This test has not been implemented yet.'
 232          );
 233      }
 234  }


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