Skip to content

Commit 363e5e9

Browse files
author
codeliner
committed
Add infos about test helpers
1 parent 30adebb commit 363e5e9

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

README.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,8 @@ PDO_USER=postgres
5252
PDO_PWD=
5353
```
5454

55+
*Note: The DB runs insight a docker container. Use `localhost` as host name if you want to connect from your host system!*
56+
5557
### RabbitMQ
5658

5759
The skeleton uses RabbitMQ as a message broker with a preconfigured exchange called `ui-exchange` and a corresponding
@@ -62,18 +64,16 @@ The skeleton also contains a demo JS client which connects to a websocket and co
6264
Open `http://localhost:8080/ws.html` in your browser and forward events on the queue with `$eventMachine->on(Event::MY_EVENT, UiExchange::class)`.
6365
Check `src/Api/Listener` for an example.
6466

65-
### GraphQL
66-
The skeleton exposes a GraphQL endpoint. You can send commands and queries using GraphQL.
67-
Event machine automatically generates a GraphQL schema from your message and type schemas.
68-
For details check the comments in the various `src/Api` files.
69-
70-
The easiest way is to install one of the available GraphQL clients for Google Chrome:
67+
## Unit and Integration Tests
68+
69+
We've prepared a `BaseTestCase` located in `tests`. Extend your test cases from that class to get access to some very useful test helpers.
70+
Check the tutorial for a detailed explanation.
7171

72-
- [ChromeiQL](https://chrome.google.com/webstore/detail/chromeiql/fkkiamalmpiidkljmicmjfbieiclmeij)
73-
- [GraphiQL Feen](https://chrome.google.com/webstore/detail/graphiql-feen/mcbfdonlkfpbfdpimkjilhdneikhfklp)
72+
You can run the tests using docker:
7473

75-
Point your GraphQL client to `http://localhost:8080/api/graphql`. It should inspect the schema generated by event machine and suggest you
76-
all available commands and queries.
74+
```bash
75+
docker-compose run php php vendor/bin/phpunit
76+
```
7777

7878
## Troubleshooting
7979

0 commit comments

Comments
 (0)