Add wrapper methods for Laravel 5 model factories #2442

Merged
merged 2 commits into from Oct 12, 2015

Conversation

Projects
None yet
1 participant
@janhenkgerritsen
Contributor

janhenkgerritsen commented Oct 12, 2015

Add wrapper methods for Laravel 5 model factories to the Laravel 5 module:

  • haveModel($model, $attributes = [], $name = 'default', $times = 1)
  • createModel($model, $attributes = [], $name = 'default', $times = 1)
  • makeModel($model, $attributes = [], $name = 'default', $times = 1)

Model factories were introduced in Laravel 5.1, so these methods can only be used if your application uses Laravel 5.1 or later.

For more details on model factories see http://laravel.com/docs/5.1/testing#model-factories.

janhenkgerritsen added a commit that referenced this pull request Oct 12, 2015

Merge pull request #2442 from janhenkgerritsen/2.1
Add wrapper methods for Laravel 5 model factories to Laravel 5 module.

@janhenkgerritsen janhenkgerritsen merged commit 35cff9d into Codeception:2.1 Oct 12, 2015

1 check was pending

continuous-integration/travis-ci/pr The Travis CI build is in progress
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment