Inheritance: extends Sonata\CustomerBundle\Entity\BaseCustomer
Example #1
0
 public function testAddAddress()
 {
     $customer = new CustomerTest();
     $address = new AddressTest();
     $address->setType(AddressInterface::TYPE_BILLING);
     $customer->addAddress($address);
     $this->assertTrue($address->getCurrent());
     $address2 = new AddressTest();
     $address2->setType(AddressInterface::TYPE_BILLING);
     $customer->addAddress($address2);
     $this->assertFalse($address2->getCurrent());
     $address = new AddressTest();
     $address->setType(AddressInterface::TYPE_CONTACT);
     $customer->addAddress($address);
     $this->assertTrue($address->getCurrent());
     $address2 = new AddressTest();
     $address2->setType(AddressInterface::TYPE_CONTACT);
     $customer->addAddress($address2);
     $this->assertFalse($address2->getCurrent());
 }