コード例 #1
0
 public function testSetMobile()
 {
     $card = new CreditCard();
     $this->assertEmpty($card->getMobile());
     $this->assertEmpty($card->getBillingMobile());
     $this->assertEmpty($card->getShippingMobile());
     $value = uniqid();
     $this->assertSame($card, $card->setMobile($value));
     $this->assertSame($value, $card->getMobile());
     $this->assertSame($value, $card->getBillingMobile());
     $this->assertSame($value, $card->getShippingMobile());
     $this->assertSame($card, $card->setMobile(null));
     $this->assertEmpty($card->getMobile());
     $this->assertEmpty($card->getBillingMobile());
     $this->assertEmpty($card->getShippingMobile());
 }