public function testCreateAddressDirectly() { $account = self::$entities['account']; $profile = $account->profile; $profileID = $profile->id; $address = new Bf_Address(array('profileID' => $profileID, 'addressLine1' => 'address line 1', 'addressLine2' => 'address line 2', 'addressLine3' => 'address line 3', 'city' => 'London', 'province' => 'London', 'country' => 'United Kingdom', 'postcode' => 'SW1 1AS', 'landline' => '02000000000', 'primaryAddress' => true)); $createdAddress = Bf_Address::create($address); $expected = Bf_Address::getResourcePath()->getEntityName(); $actual = $createdAddress['@type']; $this->assertEquals($expected, $actual, "Type of any returned entity matches known value."); }
protected function doUnserialize(array $json) { // consult parent for further unserialization parent::doUnserialize($json); $this->unserializeArrayEntities('addresses', Bf_Address::getClassName(), $json); }
public static function initStatics() { self::$_resourcePath = new Bf_ResourcePath('addresses', 'address'); }