コード例 #1
0
 /**
  * Prepares a new model set up to use a callable scope, but does not save it
  *
  * @param array $data
  * @return TestModel
  */
 protected function makeNewModelWithCallableScope(array $data = [])
 {
     $model = new TestModel($data);
     $model->setListifyConfig('scope', $this->getScopeMethodCallable());
     return $model;
 }
コード例 #2
0
 /**
  * @test
  * @expectedException \UnexpectedValueException
  */
 function it_throws_an_exception_when_config_setting_for_add_new_at_has_no_method()
 {
     $model = new TestModel();
     $model->setListifyConfig('add_new_at', 'existsNot');
 }