public function testSynchronizedForeignKeyIsValidIfLocalRelationIsSet() { $person = new TestPerson(); $person->synchronizeWithArray(array('Addresses' => array(array()))); $address = $person->Addresses[0]; $table = $address->getTable(); $errors = $table->validateField('person_id', $address->person_id, $address); $this->assertEqual(0, $errors->count()); }