/** * @covers ::getFirst */ public function testGetFirst() { $model1 = new Model(); $model2 = new Model(); $models = new Models([$model1, $model2]); $this->assertSame($model1, $models->getFirst()); $models->clear(); $this->assertNull($models->getFirst()); }
/** * Remove all the added models * * @return Save $this */ public function clear() { $this->models->clear(); return $this; }
/** * @return LinkMany $this */ public function clear() { $this->current->clear(); return $this; }