示例#1
0
 public function testSumValues()
 {
     $collection = new Collection();
     //Add fake items to collection
     $model1 = Mockery::mock('Mookofe\\LaravelSupport\\Model');
     $model2 = Mockery::mock('Mookofe\\LaravelSupport\\Model');
     $model1->shouldReceive('delete')->once()->andReturn(null);
     $model2->shouldReceive('delete')->once()->andReturn(null);
     $collection->add($model1);
     $collection->add($model2);
     //Delete items
     $collection->delete();
 }