Skip to content

Commit 298783f

Browse files
author
agrandiere
committed
change phpunit version
1 parent 3e1f656 commit 298783f

5 files changed

Lines changed: 6 additions & 8 deletions

File tree

.travis.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
language: php
22
php:
3-
- '5.4'
4-
- '5.5'
53
- '5.6'
64
- '7.0'
75
- '7.1'

check.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ class Check {
1111
function __construct($api_user, $api_secret, $models) {
1212
$this->api_user = $api_user;
1313
$this->api_secret = $api_secret;
14-
$this->http = new \GuzzleHttp\Client(['base_uri' => $this->endpoint]);
14+
$this->http = new \GuzzleHttp\Client(['base_uri' => $this->endpoint,'User-Agent' => 'SE-SDK-PHP' . '1.0']);
1515
$this->models = implode(",", $models);
1616
}
1717

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"require-dev": {
3-
"phpunit/phpunit": "^5.7"
3+
"phpunit/phpunit": "~4.4.0@stable"
44
},
55
"require": {
66
"guzzlehttp/guzzle": "~6.0"

sightengine.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,12 @@ class SightengineClient {
77
private $api_user;
88
private $api_secret;
99
private $endpoint = 'https://api.sightengine.com/';
10-
private $http;
10+
private $http;
1111

1212
function __construct($api_user, $api_secret) {
1313
$this->api_user = $api_user;
1414
$this->api_secret = $api_secret;
15-
$this->http = new \GuzzleHttp\Client(['base_uri' => $this->endpoint]);
15+
$this->http = new \GuzzleHttp\Client(['base_uri' => $this->endpoint, 'User-Agent' => 'SE-SDK-PHP' . '1.0']);
1616
}
1717

1818
public function feedback($model, $modelClass, $image) {

tests.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,10 @@ public function test_allModel()
1919
{
2020
$client = new SightengineClient('1234', 'test');
2121

22-
$output = $client->check(['nudity','wad','properties','type','face'])->image('https://sightengine.com/assets/img/examples/example5.jpg');
22+
$output = $client->check(['nudity','wad','properties','type','face', 'celebrities'])->image('https://sightengine.com/assets/img/examples/example5.jpg');
2323
$this->assertEquals('success', $output->status);
2424

25-
$output2 = $client->check(['nudity'])->image(__DIR__ . '/assets/image.jpg');
25+
$output2 = $client->check(['nudity','wad','properties','type','face', 'celebrities'])->image(__DIR__ . '/assets/image.jpg');
2626
$this->assertEquals('success', $output2->status);
2727
}
2828

0 commit comments

Comments
 (0)