예제 #1
0
 /**
  * Test get user ID to make sure it returns 0 if there is no user ID.
  * @since 2.6.0
  */
 public function test_wc_payment_get_user_id_defaults_to_0()
 {
     $token = new WC_Payment_Token_Stub();
     $this->assertEquals(0, $token->get_user_id());
 }
예제 #2
0
 /**
  * Test set user ID to make sure it passes the correct ID.
  * @since 2.6.0
  */
 public function test_wc_payment_set_user_id()
 {
     $token = new \WC_Payment_Token_Stub(1);
     $token->set_user_id(5);
     $this->assertEquals(5, $token->get_user_id());
 }