Project Name | Stars | Downloads | Repos Using This | Packages Using This | Most Recent Commit | Total Releases | Latest Release | Open Issues | License | Language |
---|---|---|---|---|---|---|---|---|---|---|
Kahlan | 1,138 | 263 | 201 | 8 days ago | 123 | June 18, 2022 | 8 | mit | PHP | |
:heavy_check_mark: PHP Test Framework for Freedom, Truth, and Justice | ||||||||||
Shellspec | 828 | 25 days ago | 74 | mit | Shell | |||||
A full-featured BDD unit testing framework for bash, ksh, zsh, dash and all POSIX shells | ||||||||||
Public | 735 | 3 days ago | 141 | |||||||
Repository for Wallaby.js questions and issues | ||||||||||
List Of Testing Tools And Frameworks For .net | 412 | 3 months ago | mit | C# | ||||||
✅ List of Automated Testing (TDD/BDD/ATDD/SBE) Tools and Frameworks for .NET | ||||||||||
Rick And Morty Info | 398 | 2 years ago | 3 | mit | ||||||
Made with Clean architecture + TDD + GraphQL + flutter_bloc + CodeCov + GitHooks + GitHub Actions (CI/CD) and finally with 💙 | ||||||||||
Stormpot | 268 | 23 | 8 | 2 years ago | 12 | June 07, 2020 | 6 | apache-2.0 | Java | |
A fast object pool for the JVM | ||||||||||
Python Mocket | 254 | 23 | 4 | a month ago | 86 | May 17, 2022 | bsd-3-clause | Python | ||
a socket mock framework - for all kinds of socket animals, web-clients included | ||||||||||
Alsatian | 249 | 136 | 175 | 2 years ago | 60 | January 10, 2020 | 100 | mit | TypeScript | |
TypeScript testing framework with test cases | ||||||||||
Bashcov | 130 | 3 | 3 months ago | 25 | March 27, 2018 | 14 | mit | Ruby | ||
Code coverage tool for Bash | ||||||||||
Ddd Tdd Rich Domain Model Dojo Kata | 70 | 3 years ago | apache-2.0 | C# | ||||||
DDD patterns implemented following TDD |
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 lets you stub or monkey patch your code directly like in Ruby or JavaScript without any required PECL-extensions.
chat.freenode.net (server) #kahlan (channel)
See the full documentation here
<?php
describe("Example", function() {
it("makes an expectation", function() {
expect(true)->toBe(true);
});
it("expects methods to be called", function() {
$user = new User();
expect($user)->toReceive('save')->with(['validates' => false]);
$user->save(['validates' => false]);
});
it("stubs a function", function() {
allow('time')->toBeCalled()->andReturn(123);
$user = new User();
expect($user->save())->toBe(true)
expect($user->created)->toBe(123);
});
it("stubs a class", function() {
allow('PDO')->toReceive('prepare', 'fetchAll')->andReturn([['name' => 'bob']]);
$user = new User();
expect($user->all())->toBe([['name' => 'bob']]);
});
});
$ composer require --dev kahlan/kahlan
Note:
Kahlan uses the Semantic Versioning and maintains a CHANGELOG
to help you easily understand what's happening.
git clone git://github.com/kahlan/kahlan.git
cd kahlan
composer install
bin/kahlan # to run specs or,
bin/kahlan --coverage=4 # to run specs with coverage info for namespaces, classes & methods (require xdebug)