From 4b83d47d83c5664d2f00742dcee84aed26872efe Mon Sep 17 00:00:00 2001 From: Ivan Enderlin Date: Wed, 29 Nov 2017 17:08:45 +0100 Subject: [PATCH] doc(readme) Add an introduction, and prepare 0.1. --- README.md | 27 +++++++++++++++++++-------- 1 file changed, 19 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index 0bc874d..0f7121f 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,17 @@ # atoum/apiblueprint-extension [![Build Status](https://travis-ci.org/Hywan/atoum-apiblueprint-extension.svg?branch=master)](https://travis-ci.org/Hywan/atoum-apiblueprint-extension) -… +[atoum](http://atoum.org/) is a PHP test +framework. [API Blueprint](https://apiblueprint.org/) is a high-level +HTTP API description language. + +API Blueprint is only a text file. The goal of this atoum extension is +to compile API Blueprint files into executable tests. It works as any +test written with the atoum API, and it works within the atoum +ecosystem. + +In addition, this atoum extension provides a very simple script to +render many API Blueprint files into a standalone HTML single-page +file. ## Installation @@ -10,18 +21,18 @@ require [`atoum/apiblueprint-extension`](https://packagist.org/packages/atoum/apiblueprint-extension): ```sh -$ composer require atoum/apiblueprint-extension '~0.0' +$ composer require atoum/apiblueprint-extension '~0.1' ``` -To always enable the extension, the `.atoum.php` configuration file must be edited to add: +To enable the extension, the `.atoum.php` configuration file must be edited to add: ```php -use atoum\apiblueprint; - -$extension = new apiblueprint\extension($script); +// Enable the extension. +$extension = new atoum\apiblueprint\extension($script); $extension->addToRunner($runner); -$extension->getAPIBFinder()->append(new FilesystemIterator(__DIR__ . '/http')); +// Compile files from the `apiblueprints` directory to executable tests. +$extension->getAPIBFinder()->append(new FilesystemIterator('./apiblueprints')); $extension->compileAndEnqueue(); ``` @@ -36,7 +47,7 @@ $ composer install Then, to run all the test suites: ```sh -$ vendor/bin/atoum --test-ext +$ composer test ``` # License