Skip to content
This repository was archived by the owner on Jan 21, 2020. It is now read-only.

Commit a72dd50

Browse files
committed
Removed documentation skeleton and updated README.md
1 parent d782fa9 commit a72dd50

File tree

9 files changed

+48
-41
lines changed

9 files changed

+48
-41
lines changed

.gitattributes

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
/.travis.yml export-ignore
55
/composer.lock export-ignore
66
/docs/ export-ignore
7-
/mkdocs.yml export-ignore
87
/phpcs.xml export-ignore
98
/phpunit.xml.dist export-ignore
109
/test/ export-ignore

.gitignore

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,4 @@
11
/clover.xml
22
/coveralls-upload.json
3-
/docs/html/
43
/phpunit.xml
54
/vendor/
6-
/zf-mkdoc-theme.tgz
7-
/zf-mkdoc-theme/

README.md

Lines changed: 28 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,22 +3,43 @@
33
[![Build Status](https://secure.travis-ci.org/zendframework/zend-container-test.svg?branch=master)](https://secure.travis-ci.org/zendframework/zend-container-test)
44
[![Coverage Status](https://coveralls.io/repos/github/zendframework/zend-container-test/badge.svg?branch=master)](https://coveralls.io/github/zendframework/zend-container-test?branch=master)
55

6-
This library provides ...
6+
This library provides common tests for PSR-11 containers configured
7+
[`zend-servicemanager`](https://github.com/zendframework/zend-servicemanager)
8+
[configuration](https://docs.zendframework.com/zend-servicemanager/configuring-the-service-manager/).
9+
10+
It guarantee us to deliver the same functionality across multiple PSR-11
11+
container implementations and simplify switching between them.
12+
13+
Currently we support:
14+
- `Aura.Di` - via [`zend-auradi-config`](https://github.com/zendframework/zend-auradi-config)
15+
- `Pimple` - via [`zend-pimple-config`](https://github.com/zendframework/zend-pimple-config)
16+
- [`zend-servicemanager`](https://github.com/zendframework/zend-servicemanager)
717

818
## Installation
919

1020
Run the following to install this library:
1121

1222
```bash
13-
$ composer require zendframework/zend-container-test
23+
$ composer require --dev zendframework/zend-container-test
1424
```
1525

16-
## Documentation
26+
## Using common tests
1727

18-
Documentation is [in the doc tree](docs/book/), and can be compiled using [mkdocs](http://www.mkdocs.org):
28+
In your library you have to extends `Zend\ContainerTest\ContainerTest` class
29+
and implement method `createContainer`:
1930

20-
```bash
21-
$ mkdocs build
31+
```php
32+
protected function createContainer(array $config) : ContainerInterface;
2233
```
2334

24-
You may also [browse the documentation online](https://docs.zendframework.com/zend-container-test/).
35+
It should return configured PSR-11 container.
36+
37+
Then, depends what functionality you'd like to support, you can add the
38+
following traits into your test case:
39+
40+
- `Zend\ContainerTest\AliasTestTrait` - to support `aliases` configuration,
41+
- `Zend\ContainerTest\FactoryTestTrait` - to support `factories` configuration,
42+
- `Zend\ContainerTest\InvokableTestTrait` - to support `invokables` configuration,
43+
- `Zend\ContainerTest\SharedTestTrait` - to support `shared` and `shared_by_default` configurations,
44+
45+
or use `Zend\ContainerTest\AllTestTrait` to support whole `zend-servicemanager` configuration.

docs/book/index.html

Lines changed: 0 additions & 9 deletions
This file was deleted.

docs/book/index.md

Lines changed: 0 additions & 1 deletion
This file was deleted.

docs/book/intro.md

Lines changed: 0 additions & 3 deletions
This file was deleted.

mkdocs.yml

Lines changed: 0 additions & 9 deletions
This file was deleted.

src/AllTestTrait.php

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
<?php
2+
/**
3+
* @see https://github.com/zendframework/zend-container-test for the canonical source repository
4+
* @copyright Copyright (c) 2018 Zend Technologies USA Inc. (https://www.zend.com)
5+
* @license https://github.com/zendframework/zend-container-test/blob/master/LICENSE.md New BSD License
6+
*/
7+
8+
declare(strict_types=1);
9+
10+
namespace Zend\ContainerTest;
11+
12+
trait AllTestTrait
13+
{
14+
use AliasTestTrait;
15+
use FactoryTestTrait;
16+
use InvokableTestTrait;
17+
use SharedTestTrait;
18+
}

test/BaseContainerTest.php

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -9,16 +9,10 @@
99

1010
namespace ZendTest\ContainerTest;
1111

12-
use Zend\ContainerTest\AliasTestTrait;
12+
use Zend\ContainerTest\AllTestTrait;
1313
use Zend\ContainerTest\ContainerTest;
14-
use Zend\ContainerTest\FactoryTestTrait;
15-
use Zend\ContainerTest\InvokableTestTrait;
16-
use Zend\ContainerTest\SharedTestTrait;
1714

1815
abstract class BaseContainerTest extends ContainerTest
1916
{
20-
use AliasTestTrait;
21-
use FactoryTestTrait;
22-
use InvokableTestTrait;
23-
use SharedTestTrait;
17+
use AllTestTrait;
2418
}

0 commit comments

Comments
 (0)