Skip to content

Commit 8dc1e3b

Browse files
authored
Merge pull request #10 from 0x46616c6b/integration-tests
Added integration tests
2 parents f728976 + f89af52 commit 8dc1e3b

12 files changed

+1728
-17
lines changed

.scrutinizer.yml

+1
Original file line numberDiff line numberDiff line change
@@ -15,3 +15,4 @@ build:
1515
filter:
1616
excluded_paths:
1717
- src/EtherpadLite/Tests/*
18+
- features/*

.travis.yml

+12-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,18 @@
1+
sudo: required
2+
13
language: php
24
php:
35
- 5.6
46
- 7.0
57
- 7.1
68

7-
before_script: composer install
8-
script: vendor/bin/phpunit
9+
services:
10+
- docker
11+
12+
before_script:
13+
- docker pull systemli/etherpad-lite:1.6.1
14+
- docker run -d -p 127.0.0.1:9001:9001 systemli/etherpad-lite:1.6.1
15+
- composer install
16+
script:
17+
- vendor/bin/phpunit
18+
- vendor/bin/behat -f progress

README.md

+29-13
Original file line numberDiff line numberDiff line change
@@ -4,26 +4,42 @@
44

55
This package provides an easy access to [Etherpad Lite](https://github.com/ether/etherpad-lite) throw there built-in [HTTP API](http://etherpad.org/doc/v1.2.11/#index_http_api).
66

7+
**Supported API Version: 1.2.13 (Release: 1.6.1)**
8+
79
## Installation
810

911
Install the package via Composer
1012

11-
composer require 0x46616c6b/etherpad-lite-client
13+
composer require 0x46616c6b/etherpad-lite-client
1214

1315
Example (after install)
1416

15-
<?php
16-
17-
$client = new \EtherpadLite\Client($apikey);
18-
// if you don't use http://localhost:9001
19-
//$client = new \EtherpadLite\Client($apikey, 'http://example.com:9001');
20-
21-
/** @var $response \EtherpadLite\Response */
22-
$response = $client->checkToken();
23-
24-
echo $response->getCode();
25-
echo $response->getMessage();
26-
echo $response->getData();
17+
<?php
18+
19+
$client = new \EtherpadLite\Client($apikey);
20+
// if you don't use http://localhost:9001
21+
//$client = new \EtherpadLite\Client($apikey, 'http://example.com:9001');
22+
23+
/** @var $response \EtherpadLite\Response */
24+
$response = $client->checkToken();
25+
26+
echo $response->getCode();
27+
echo $response->getMessage();
28+
echo $response->getData();
29+
30+
## Testing
31+
32+
vendor/bin/phpunit
33+
34+
# Integration Tests
35+
# > requires a running etherpad lite instance
36+
#
37+
# Environment Variables:
38+
# ----------------------
39+
# API_KEY=cqOtzCYEUyzR23s8tftePVo8HHO
40+
# BASE_URL=http://localhost:9001
41+
42+
vendor/bin/behat -f progress
2743

2844
## Contributing
2945

composer.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
"guzzlehttp/guzzle": "~6.0"
1717
},
1818
"require-dev": {
19-
"phpunit/phpunit": "~5.7"
19+
"phpunit/phpunit": "~5.7",
20+
"behat/behat": "^3.3"
2021
}
2122
}

0 commit comments

Comments
 (0)