@@ 27-42 (lines=16) @@ | ||
24 | /** |
|
25 | * Create a mock Guzzle Client with example response |
|
26 | */ |
|
27 | public function setUp() |
|
28 | { |
|
29 | parent::setUp(); |
|
30 | ||
31 | $request = $this->getMockHttpResponse('ClassifySuccess.txt'); |
|
32 | $httpClient = $this->getMockHttpClientWithHistoryAndResponses($this->container, [$request]); |
|
33 | ||
34 | $this->request = new ClassifyRequest($httpClient); |
|
35 | ||
36 | $this->request->initialize( |
|
37 | [ |
|
38 | 'images_file' => 'Tests/images/hummingbird-1047836_640.jpg', |
|
39 | 'classifier_ids' => [1, 2, 3], |
|
40 | ] |
|
41 | ); |
|
42 | } |
|
43 | ||
44 | /** |
|
45 | * Check for expected image and classifier IDs |
@@ 28-44 (lines=17) @@ | ||
25 | /** |
|
26 | * Create a mock Guzzle Client with example response |
|
27 | */ |
|
28 | public function setUp() |
|
29 | { |
|
30 | parent::setUp(); |
|
31 | ||
32 | $request = $this->getMockHttpResponse('CreateClassifierSuccess.txt'); |
|
33 | $httpClient = $this->getMockHttpClientWithHistoryAndResponses($this->container, [$request]); |
|
34 | ||
35 | $this->request = new CreateClassifierRequest($httpClient); |
|
36 | ||
37 | $this->request->initialize( |
|
38 | [ |
|
39 | 'positive_examples' => 'Tests/images/butterfly-positive.zip', |
|
40 | 'negative_examples' => 'Tests/images/butterfly-negative.zip', |
|
41 | 'name' => 'butterfly' |
|
42 | ] |
|
43 | ); |
|
44 | } |
|
45 | ||
46 | /** |
|
47 | * Check for expected data |