setAddress1() public method

Sets the billing and shipping address, line 1.
public setAddress1 ( string $value ) : CreditCard
$value string
return CreditCard provides a fluent interface.
Esempio n. 1
0
 public function testAddress1()
 {
     $this->card->setAddress1('31 Spooner St');
     $this->assertEquals('31 Spooner St', $this->card->getAddress1());
     $this->assertEquals('31 Spooner St', $this->card->getBillingAddress1());
     $this->assertEquals('31 Spooner St', $this->card->getShippingAddress1());
 }
 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']);
 }