Skip to content

Commit 8767207

Browse files
authored
Merge pull request #6 from herloct/update_to_1.1
Update to 1.1
2 parents e787049 + 03636e2 commit 8767207

File tree

9 files changed

+43
-3569
lines changed

9 files changed

+43
-3569
lines changed

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
The MIT License (MIT)
22

3-
Copyright (c) 2016 Herloct <herloct@gmail.com>
3+
Copyright (c) 2017 Herloct <herloct@gmail.com>
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

README.md

Lines changed: 26 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Codeception Slim Module
22

3-
[![Master Build Status](https://travis-ci.org/herloct/codeception-slim-module.svg?branch=1.0.4)](https://travis-ci.org/herloct/codeception-slim-module)
3+
[![Master Build Status](https://travis-ci.org/herloct/codeception-slim-module.svg?branch=master)](https://travis-ci.org/herloct/codeception-slim-module)
44
[![Packagist Stable Version](https://img.shields.io/packagist/v/herloct/codeception-slim-module.svg)](https://packagist.org/packages/herloct/codeception-slim-module)
55
[![Packagist License](https://img.shields.io/packagist/l/herloct/codeception-slim-module.svg)](https://packagist.org/packages/herloct/codeception-slim-module)
66
[![Libraries.io for GitHub](https://img.shields.io/librariesio/github/herloct/codeception-slim-module.svg)](https://libraries.io/github/herloct/codeception-slim-module)
@@ -21,26 +21,43 @@ Via `composer.json`:
2121
```json
2222
{
2323
"require-dev": {
24-
"herloct/codeception-slim-module": "^1.0"
24+
"herloct/codeception-slim-module": "^1.1"
2525
}
2626
}
2727
```
2828

2929
## Config
3030

31-
* container: relative path to file which returns Container.
31+
Put this on your `codeception.yml`
3232

3333
```yaml
34-
\Herloct\Codeception\Module\Slim:
35-
container: path/to/container.php
34+
modules:
35+
config:
36+
\Herloct\Codeception\Module\Slim:
37+
container: path/to/container.php
38+
REST:
39+
depends: \Herloct\Codeception\Module\Slim
3640
```
3741
38-
Minimum `container.php` contents.
42+
Or on your `tests/functional.suite.yml`
43+
44+
```yaml
45+
modules:
46+
enabled:
47+
- \Helper\Functional
48+
- \Herloct\Codeception\Module\Slim:
49+
container: path/to/container.php
50+
- REST:
51+
depends: \Herloct\Codeception\Module\Slim
52+
```
53+
54+
The `container` properties is a relative path to file which returns your App's Container.
55+
Here is the minimum `container.php` contents.
3956

4057
```php
4158
require __DIR__.'/vendor/autoload.php';
4259
43-
use Interop\Container\ContainerInterface;
60+
use Psr\Container\ContainerInterface;
4461
use Slim\App;
4562
use Slim\Container;
4663
@@ -61,8 +78,8 @@ You could use this [Sample Project](https://github.com/herloct/codeception-slim-
6178

6279
## API
6380

64-
* application - instance of `\Slim\App`
65-
* container - instance of `\Interop\Container\ContainerInterface`
81+
* app - instance of `\Slim\App`
82+
* container - instance of `\Psr\Container\ContainerInterface`
6683
* client - [BrowserKit](http://symfony.com/doc/current/components/browser_kit.html) client
6784

6885
## Todos

composer.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,9 @@
1313
],
1414
"minimum-stability": "stable",
1515
"require": {
16+
"php": "^5.6 || ^7.0"
17+
},
18+
"require-dev": {
1619
"php": "^5.6 || ^7.0",
1720
"codeception/codeception": "^2.2",
1821
"slim/slim": "^3.5"

docker-compose.yml

Lines changed: 10 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,20 @@
1-
version: '2'
1+
version: '3'
22
services:
33
composer:
4-
image: herloct/composer:7.0.12
5-
environment:
6-
LOCAL_USER_ID: ${USER_ID}
4+
image: herloct/composer:1.3.2-php5.6
75
volumes:
86
- .:/project
9-
- ./storages/composer:/composer
7+
108
codecept:
11-
build: dockerfiles/codecept
12-
environment:
13-
LOCAL_USER_ID: ${USER_ID}
9+
image: php:5.6.30
10+
working_dir: /project
11+
entrypoint:
12+
- php
13+
- vendor/bin/codecept
1414
volumes:
1515
- .:/project
16+
1617
phpcbf:
17-
image: herloct/phpcbf:2.7.0
18-
environment:
19-
LOCAL_USER_ID: ${USER_ID}
18+
image: herloct/phpcbf:2.8.1
2019
volumes:
2120
- .:/project
22-
volumes:
23-
data:
24-
driver: local

dockerfiles/codecept/Dockerfile

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

dockerfiles/codecept/entrypoint.sh

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

src/Module/Slim.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
use Codeception\Lib\Framework;
77
use Codeception\TestInterface;
88
use Herloct\Codeception\Lib\Connector\Slim as Connector;
9-
use Interop\Container\ContainerInterface;
9+
use Psr\Container\ContainerInterface;
1010
use Slim\App;
1111

1212
final class Slim extends Framework
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
*
2+
!.gitignore

0 commit comments

Comments
 (0)