Skip to content

Commit fe52125

Browse files
committed
Added test to verify walmart product when not parsed
1 parent f0d8265 commit fe52125

File tree

2 files changed

+150
-0
lines changed

2 files changed

+150
-0
lines changed

tests/Feature/OxylabsApiClientTest.php

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -263,6 +263,19 @@ public function test_walmart_product()
263263
$this->assertCount(1, $result->results);
264264
}
265265

266+
public function test_walmart_product_raw()
267+
{
268+
Http::fake([
269+
'data.oxylabs.io/v1/queries/7342973874281147393/results?type=raw' => Http::response($this->getFixtureJsonContent('walmart_raw_result.json'), 200),
270+
]);
271+
272+
$client = new OxylabsApiClient(username: 'user', password: 'pass');
273+
274+
$result = $client->getWalmartProductResult('7342973874281147393', type: 'raw');
275+
276+
$this->assertIsString($result->results[0]->content);
277+
}
278+
266279
public function test_walmart_screenshot()
267280
{
268281
Http::fake([

tests/Fixtures/walmart_raw_result.json

Lines changed: 137 additions & 0 deletions
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)