示例#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());
 }
示例#2
0
文件: Save.php 项目: harp-orm/core
 /**
  * Remove all the added models
  *
  * @return Save $this
  */
 public function clear()
 {
     $this->models->clear();
     return $this;
 }
示例#3
0
 /**
  * @return LinkMany $this
  */
 public function clear()
 {
     $this->current->clear();
     return $this;
 }