Skip to content

Commit

Permalink
Improve readme syntax highlight
Browse files Browse the repository at this point in the history
  • Loading branch information
dompie committed Mar 19, 2024
1 parent 59b2e24 commit cd3c825
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@
A PHP HTTP client for the Keila newsletter API with Guzzle as single dependency.

### Install
```
```bash
composer require dompie/keila-http-api
```

### How to use
```
```php
require_once 'vendor/autoload.php';

$httpClient = new \GuzzleHttp\Client();
Expand All @@ -30,7 +30,7 @@ Then you can pass the Guzzle ResponseInterface to your context.

### Response helper
For testing purposes I've added also a KeilaResponse class to quickly access relevant items.
```
```php
$response = \Dompie\KeilaApiClient\KeilaResponse::new($responseInterface);
$response->hasData();
$response->getDataItem(0); //First element from the data property
Expand All @@ -39,18 +39,18 @@ $response->getGuzzleResponse()->getStatusCode()


### ⚠️ Tests will trigger E-Mail sending. Use only with keila dev instance.
```
```bash
cp phpunit.xml.dist phpunit.xml
```

Put your Keila URI and Keila api key into phpunit.xml:
```
```xml
<env name="KEILA_BASE_URI" value="http://keila.local:4000" force="true"/>
<env name="KEILA_API_KEY" value="secret-api-key" force="true"/>
```

#### Finally tests
```
```bash
make test
or
XDEBUG_MODE=coverage make test-coverage
Expand Down

0 comments on commit cd3c825

Please sign in to comment.