Kahlan is a full-featured Unit & BDD test framework a la RSpec/JSpec which uses a describe-it
syntax and moves testing in PHP one step forward.
Kahlan allows to stub or monkey patch your code directly like in Ruby or JavaScript without any required PECL-extentions.
describe-it
syntax similar to modern BDD testing frameworks- Code Coverage metrics (xdebug or phpdbg required)
- Handy stubbing system (mockery or prophecy are no longer needed)
- Set stubs on your class methods directly (i.e allows dynamic mocking)
- Ability to Monkey Patch your code (i.e. allows replacement of core functions/classes on the fly)
- Check called methods on your classes/instances
- Built-in Reporters (Terminal or HTML reporting through istanbul or lcov)
- Built-in Exporters (Coveralls, Code Climate, Scrutinizer, Clover)
- Extensible, customizable workflow
Licensed using the MIT license.
The MIT License (MIT)
Copyright (c) 2014 CrysaLEAD
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
To contribute to Kahlan, open a pull request against the dev
branch with your change. Be sure to update the specs to verify your change works as expected and to prevent regressions.