leafs / alchemy
A simple command line tool for installing and interacting with your leaf apps
Fund package maintenance!
Open Collective
leafsphp
Requires
- ext-json: *
- leafs/fs: *
- pestphp/pest: *
- phpunit/phpunit: ^9.0
- psy/psysh: ^0.10.0
- symfony/console: ^5.0
- symfony/process: ^5.0
README
Alchemy
Alchemy is a Leaf module which allows you to quickly and efficiently create and run tests in your Leaf apps. Leaf 3 is built with testing in mind. In fact, support for testing with Pest PHP/PHPUnit is included out of the box. However, Alchemy allows you to avoid all the hustle and write your tests without having to setup anything. Just run the setup script and run your tests without any config or anything like that.
📦 Installation
You can quickly install alchemy with leaf CLI
leaf install alchemy
Or with composer
composer require leafs/alchemy
🗂 Your First Test
After installing Alchemy, simply run the setup script
./vendor/bin/alchemy setup
This uses Pest PHP by default. If you want to use PHPUnit, you can add the --phpunit
option to the setup script.
./vendor/bin/alchemy setup --phpunit
This will setup dummy tests and an alchemy.config.php
file which you can use to gain a little more control over your tests. After writing the tests you need to write, you can simply run the test script.
./vendor/bin/alchemy run
Based on your engine, you might see either of the outputs below
- PEST PHP
- PHPUnit
Alchemy is a test runner, not a testing framework.
Commands
💬 Stay In Touch
📓 Learning Leaf 3
- Leaf has a very easy to understand documentation which contains information on all operations in Leaf.
- You can also check out our youtube channel which has video tutorials on different topics
- We are also working on codelabs which will bring hands-on tutorials you can follow and contribute to.
😇 Contributing
We are glad to have you. All contributions are welcome! To get started, familiarize yourself with our contribution guide and you'll be ready to make your first pull request 🚀.
To report a security vulnerability, you can reach out to @mychidarko or @leafphp on twitter. We will coordinate the fix and eventually commit the solution in this project.
Code contributors
Michael Darko |
🤩 Sponsoring Leaf
Your cash contributions go a long way to help us make Leaf even better for you. You can sponsor Leaf and any of our packages on open collective or check the contribution page for a list of ways to contribute.
And to all our existing cash/code contributors, we love you all ❤️
Cash contributors
Aaron Smith |
Peter Bogner |
Vano |