A containerized installation of laravel, distributed for a testing workshop.
This project uses Docker to install all of the necessary dependencies within a sandboxed container. To get started, ensure you have the following:
- docker (or colima) : a tool for managing and running containers
- ddev : a tool that makes docker easier to use
If you're using homebrew (macOS), the above dependencies can be installed easily:
brew install homebrew/cask/docker
brew install drud/ddev/ddev
git clone http://github.com/nickworks/test-demo-laravel
to clone the projectcd test-demo-laravel
to navigate into the project directorycp .env.example .env
to create an env fileddev start
to run the containerddev ssh
to ssh into the containercomposer update
to install PHP packagesphp artisan key:generate
to generate Laravel's App Key valuephp artisan migrate
to create tables in the database
exit
will close the ssh connection to the containerddev stop
will stop the containerddev powerdown
will stop all containers managed by ddev
php artisan make:test [TestName]
will make a new feature test filephp artisan make:test [TestName] --unit
will make a new unit test filephp artisan test
will run all testsphp artisan test --filter=something
will run some testsphp artisan test --coverage-html=output-directory
will generate a coverage report