public addInheritedAssociationMapping ( array $mapping ) : void | ||
$mapping | array | |
return | void |
public function addInheritedAssociationMapping(array $mapping)
{
$this->associationMappings[$mapping['fieldName']] = $mapping;
}
public function testAddInheritedAssociationMapping() { $cm = new ClassMetadataInfo('stdClass'); $mapping = array('fieldName' => 'assoc', 'reference' => true, 'type' => 'one', 'simple' => true); $cm->addInheritedAssociationMapping($mapping); $expected = array('assoc' => $mapping); $this->assertEquals($expected, $cm->associationMappings); }