예제 #1
0
 /**
  * Test creating a new token.
  * @since 2.6.0
  */
 public function test_wc_payment_token_create()
 {
     $token = new WC_Payment_Token_Stub();
     $token->set_extra(__FUNCTION__);
     $token->set_token(time());
     $token->save();
     $this->assertNotEmpty($token->get_id());
     $token = new WC_Payment_Token_Stub($token->get_id());
     $this->assertEquals(__FUNCTION__, $token->get_extra());
 }