set_billing_email() public method

Set billing_email.
public set_billing_email ( string $value )
$value string
Beispiel #1
0
 /**
  * Test: get_billing_email
  */
 function test_get_billing_email()
 {
     $object = new WC_Order();
     $set_to = '*****@*****.**';
     $object->set_billing_email($set_to);
     $this->assertEquals($set_to, $object->get_billing_email());
     $set_to = 'not an email';
     $this->setExpectedException('WC_Data_Exception');
     $object->set_billing_email($set_to);
     $this->assertEquals('*****@*****.**', $object->get_billing_email());
 }
Beispiel #2
0
 /**
  * Test: get_billing_email
  */
 function test_get_billing_email()
 {
     $object = new WC_Order();
     $set_to = '*****@*****.**';
     $object->set_billing_email($set_to);
     $this->assertEquals($set_to, $object->get_billing_email());
     $set_to = 'not an email';
     $object->set_billing_email($set_to);
     $this->assertEquals('', $object->get_billing_email());
 }