/** * @test */ public function it_throw_an_exception_if_trying_to_save_a_model_with_exits_false() { $connection = \Mockery::mock(Connection::class); $model = new PersistenceModelTest(); $model->exists = false; $this->setExpectedException('Exception'); $persistence = new EloquentPersistence($connection); $persistence->model($model); $persistence->save(); }