Ejemplo n.º 1
0
 /**
  * @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());
 }
Ejemplo n.º 2
0
 /**
  * Remove all the added models
  *
  * @return Save $this
  */
 public function clear()
 {
     $this->models->clear();
     return $this;
 }
Ejemplo n.º 3
0
 /**
  * @return LinkMany $this
  */
 public function clear()
 {
     $this->current->clear();
     return $this;
 }