Skip to content

Commit

Permalink
doc(readme) Add an introduction, and prepare 0.1.
Browse files Browse the repository at this point in the history
  • Loading branch information
Hywan committed Nov 29, 2017
1 parent f12be03 commit 4b83d47
Showing 1 changed file with 19 additions and 8 deletions.
27 changes: 19 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
@@ -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

Expand All @@ -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();
```

Expand All @@ -36,7 +47,7 @@ $ composer install
Then, to run all the test suites:

```sh
$ vendor/bin/atoum --test-ext
$ composer test
```

# License
Expand Down

0 comments on commit 4b83d47

Please sign in to comment.