getNew() public method

Get a new related item which satisfies relation $name and adds it to this relation's data list.
public getNew ( string $name ) : DataModel
$name string The relation based on which a new item is returned
return FOF30\Model\DataModel
Example #1
0
 /**
  * @group       RelationManager
  * @group       RelationManagerGetNew
  * @covers      FOF30\Model\DataModel\RelationManager::getNew
  */
 public function testGetNewException()
 {
     $this->setExpectedException('\\FOF30\\Model\\DataModel\\Relation\\Exception\\RelationNotFound');
     $model = $this->buildModel();
     $relation = new RelationManager($model);
     $relation->getNew('test');
 }