/** * @return \Orm\Zed\Sales\Persistence\SpySalesOrderAddress */ protected function createSalesOrderAddress() { $salesOrderAddressEntity = new SpySalesOrderAddress(); $salesOrderAddressEntity->setAddress1(1); $salesOrderAddressEntity->setAddress2(2); $salesOrderAddressEntity->setSalutation('Mr'); $salesOrderAddressEntity->setCellPhone('123456789'); $salesOrderAddressEntity->setCity('City'); $salesOrderAddressEntity->setCreatedAt(new \DateTime()); $salesOrderAddressEntity->setUpdatedAt(new \DateTime()); $salesOrderAddressEntity->setComment('Comment'); $salesOrderAddressEntity->setDescription('Description'); $salesOrderAddressEntity->setCompany('Company'); $salesOrderAddressEntity->setFirstName('FirstName'); $salesOrderAddressEntity->setLastName('LastName'); $salesOrderAddressEntity->setFkCountry(1); $salesOrderAddressEntity->setEmail('Email'); $salesOrderAddressEntity->setZipCode(12345); $salesOrderAddressEntity->save(); return $salesOrderAddressEntity; }
/** * @return \Orm\Zed\Sales\Persistence\SpySalesOrderAddress */ protected function createBillingAddress() { $billingAddressEntity = new SpySalesOrderAddress(); $countryEntity = $this->getCountryEntity(); $billingAddressEntity->setCountry($countryEntity); $billingAddressEntity->setSalutation(SpySalesOrderAddressTableMap::COL_SALUTATION_MR); $billingAddressEntity->setFirstName('FirstName'); $billingAddressEntity->setLastName('LastName'); $billingAddressEntity->setAddress1('Address1'); $billingAddressEntity->setAddress2('Address2'); $billingAddressEntity->setCity('City'); $billingAddressEntity->setZipCode('12345'); $billingAddressEntity->save(); return $billingAddressEntity; }