addInheritedAssociationMapping() public method

This is mainly used to add inherited association mappings to derived classes.
public addInheritedAssociationMapping ( array $mapping ) : void
$mapping array
return void
 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);
 }