示例#1
0
 /**
  * @covers ::add
  */
 public function testAdd()
 {
     $models = new Models();
     $model = new Model();
     $models->add($model);
     $this->assertSame([$model], Objects::toArray($models->all()));
 }
示例#2
0
文件: Models.php 项目: harp-orm/core
 /**
  * @param  Models $models
  * @return Models $this
  */
 public function removeAll(Models $models)
 {
     $this->models->removeAll($models->all());
     return $this;
 }