public function testSaving() { Animal::all()->save(function ($animal) { if ($animal->type == 'frog') { $animal->type = 'tadpole'; } }); $this->assertCount(2, Animal::findByType('tadpole')); }