public function testAllAttributesAreSavedIfPersistedIsEmpty()
 {
     $car = new Car();
     $car->color = 'red';
     $car->fuel = 'unleaded';
     $car->cruft = 'red is my favorite';
     Car::withAllPersisted([], function () use($car) {
         $car->save();
     });
     $dbCar = DB::table('vehicles')->first();
     $this->assertEquals($car->id, $dbCar->id);
     $this->assertEquals('red is my favorite', $dbCar->cruft);
     $this->assertEquals('red', $dbCar->color);
     $this->assertEquals('unleaded', $dbCar->fuel);
 }
 public function testUpdateRemovesScope()
 {
     $car = new Car();
     $car->color = 'red';
     $car->save();
     $dbCar = Vehicle::where('color', 'red')->first();
     $dbCar->color = 'green';
     $this->assertTrue($dbCar->save());
     // if the scope doesn't remove bindings this save will throw an exception.
 }