Example #1
0
 /**
  * @covers ::addArray
  */
 public function testAddArray()
 {
     $models = new Models();
     $array = [new Model(), new Model()];
     $models->addArray($array);
     $this->assertSame($array, Objects::toArray($models->all()));
 }
Example #2
0
 /**
  * @param  AbstractModel[] $models
  * @return LinkMany        $this
  */
 public function addArray(array $models)
 {
     $this->current->addArray($models);
     return $this;
 }