Skip to content

Instantly share code, notes, and snippets.

@JuanVqz
Last active May 6, 2018 21:45
Show Gist options
  • Save JuanVqz/dcaa45380e9b3402d7e33cb1f7e7b883 to your computer and use it in GitHub Desktop.
Save JuanVqz/dcaa45380e9b3402d7e33cb1f7e7b883 to your computer and use it in GitHub Desktop.
functions utilities phpunit, factory make
<?php
// composer.json
// "autoload-dev": {
// ...
// "files": ["tests/utilities/functions.php"]
// ...
// }
function create($class, $attributes = [])
{
return factory($class)->create($attributes);
}
function make($class, $attributes = [])
{
return factory($class)->make($attributes);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment