Hope is a very lightweight PHP microframework.
Check a example of Hope application
$ composer require pedrofaria/hope
Very simple usage of Hope microframework.
$app = new Hope\Application;
$app->setRoute(function(Hope\Router\RouteCollector $route) {
$route->add('GET', '/ping', function() {
return ['data' => 'pong'];
});
});
$app->bootstrap();
$app->run();
And that's it!
Check the Wiki with all Hope documentation.
Codeception was chosen on this project to support all tests. To run, use the command below:
$ vendor/bin/codecept run unit
If you want run with code coverage, use the follow command and the HTML report will be available at tests/_output/coverage
.
$ vendor/bin/codecept run unit --coverage --coverage-html