Skip to content

Commit 0597753

Browse files
Change what gets called after install (#13)
* [ch] remove linter and docker cmd's from install * [f] update with new method calls * [ch] update docker commands for ease of use * [f] update composer script * [ch] try to run tests via composer
1 parent 198231b commit 0597753

File tree

3 files changed

+9
-16
lines changed

3 files changed

+9
-16
lines changed

.travis.yml

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,6 @@ language: php
33
services:
44
- docker
55

6-
after_install:
7-
- docker stop reactive_slim
8-
- docker rm reactive_slim
9-
106
php:
117
- 7.0
128
- 7.1
@@ -17,5 +13,4 @@ before_script:
1713

1814
script:
1915
- ./bin/phpcs -p --standard=psr2-override.xml src
20-
- ./bin/phpspec r
21-
- ./bin/phpunit -c ./test/phpunit.xml.dist ./test/
16+
- composer test

composer.json

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -55,19 +55,17 @@
5555
"sort-packages": true
5656
},
5757
"scripts": {
58-
"docker-build": "docker build -t nigelgreenway/reactive-slim .",
59-
"docker-run": "docker run -d -p 1351:1351 --name reactive_slim nigelgreenway/reactive-slim",
60-
"docker-start": "docker start reactive_slim",
61-
"docker-stop": "docker stop reactive_slim",
62-
"test": "phpspec r && phpunit -c ./test/phpunit.xml.dist ./test",
58+
"build": "docker build -t nigelgreenway:reactive-slim .",
59+
"start": "docker run -d -p 1351:1351 --name reactive_slim nigelgreenway:reactive-slim",
60+
"restart": "docker restart reactive_slim",
61+
"stop": "docker stop reactive_slim",
62+
"test": "composer start && phpspec r && phpunit -c ./test/phpunit.xml.dist ./test && composer stop",
6363
"check-style": "phpcs -p --standard=psr2-override.xml --runtime-set ignore_errors_on_exit 1 --runtime-set ignore_warnings_on_exit 1 src",
6464
"fix-style": "phpcbf -p --standard=psr2-override.xml --runtime-set ignore_errors_on_exit 1 --runtime-set ignore_warnings_on_exit 1 src",
6565
"clean": "rm -r ./{vendor,bin} && docker stop reactive_slim && docker rm reactive_slim",
6666
"post-install-cmd": [
6767
"captainhook install",
68-
"composer check-style",
69-
"composer docker-build",
70-
"composer docker-run"
68+
"composer build"
7169
]
7270
}
7371
}

test/Integration/ServerStub.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,6 @@
1313
});
1414

1515
(new \ReactiveSlim\Server($slim))
16-
->withHost('0.0.0.0')
17-
->withPort(1351)
16+
->setHost('0.0.0.0')
17+
->setPort(1351)
1818
->run();

0 commit comments

Comments
 (0)