setPhone() public method

Sets the billing and shipping phone number.
public setPhone ( string $value ) : CreditCard
$value string
return CreditCard provides a fluent interface.
Beispiel #1
0
 public function testPhone()
 {
     $this->card->setPhone('12345');
     $this->assertEquals('12345', $this->card->getPhone());
     $this->assertEquals('12345', $this->card->getBillingPhone());
     $this->assertEquals('12345', $this->card->getShippingPhone());
 }
 public function testCardDetails()
 {
     $card = new CreditCard();
     $card->setName('Test Foo');
     $card->setEmail('*****@*****.**');
     $card->setCompany('Test Company');
     $card->setPostcode('13100');
     $card->setCity('Nicetown');
     $card->setCountry('TN');
     $card->setPhone('00999555666');
     $card->setAddress1('Home street');
     $card->setAddress2('Near the shop');
     $this->request->setCard($card);
     $data = $this->request->getData();
     $this->assertSame("Test Foo", $data['CN']);
     $this->assertSame("*****@*****.**", $data['EMAIL']);
     $this->assertSame("Test Company", $data['COM']);
     $this->assertSame("13100", $data['OWNERZIP']);
     $this->assertSame("Nicetown", $data['OWNERTOWN']);
     $this->assertSame("TN", $data['OWNERCTY']);
     $this->assertSame("00999555666", $data['OWNERTELNO']);
     $this->assertSame("Home street", $data['OWNERADDRESS']);
     $this->assertSame("Near the shop", $data['OWNERADDRESS2']);
 }