OXIESEC PANEL
- Current Dir:
/
/
var
/
www
/
reader
/
zaws-ses
/
vendor
/
aws
/
aws-sdk-php
/
tests
/
MachineLearning
Server IP: 139.59.38.164
Upload:
Create Dir:
Name
Size
Modified
Perms
📁
..
-
11/12/2024 10:59:38 AM
rwxr-xr-x
📄
MachineLearningClientTest.php
1.15 KB
07/30/2024 12:09:10 PM
rw-r--r--
Editing: MachineLearningClientTest.php
Close
<?php namespace Aws\Test\MachineLearning; use Aws\Middleware; use Aws\MachineLearning\MachineLearningClient; use Aws\Test\UsesServiceTrait; use GuzzleHttp\Psr7\Uri; use PHPUnit\Framework\TestCase; /** * @covers Aws\MachineLearning\MachineLearningClient */ class MachineLearningClientTest extends TestCase { use UsesServiceTrait; public function testUpdatesPredictEndpoint() { // Setup state of command/request $predictEndpoint = new Uri('https://realtime.machinelearning.us-east-1.amazonaws.com/foo'); $client = new MachineLearningClient([ 'region' => 'us-east-1', 'version' => 'latest' ]); $this->addMockResults($client, [[]]); $client->getHandlerList()->appendSign(Middleware::tap(function ($c, $r) use (&$command, &$request) { $command = $c; $request = $r; })); $client->predict([ 'MLModelId' => 'foo', 'Record' => ['foo' => 'bar'], 'PredictEndpoint' => (string) $predictEndpoint ]); $this->assertSame($predictEndpoint->getHost(), $request->getUri()->getHost()); } }