Skip to content

Commit 55bf3f4

Browse files
committed
test cases for method assert
1 parent 61ac893 commit 55bf3f4

File tree

1 file changed

+27
-0
lines changed

1 file changed

+27
-0
lines changed

tests/ImageKit/Manage/FileTest.php

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -517,6 +517,33 @@ public function testUpdateFileDetails()
517517
FileTest::assertEquals($requestMethod,'PATCH');
518518
}
519519

520+
public function testUpdateFileDetailsWithInvalidTags()
521+
{
522+
$fileId = '5df36759adf3f523d81dd94f';
523+
524+
$updateData = [
525+
'customCoordinates' => '10,10,100,100',
526+
'tags' => 'tag1,tag2',
527+
'removeAITags'=>['car','vehicle','motorsports'],
528+
'extensions'=>[
529+
[
530+
"name" => "google-auto-tagging",
531+
"maxTags" => 5,
532+
"minConfidence" => 95
533+
]
534+
],
535+
"customMetadata" => [
536+
"SKU" => "VS882HJ2JD",
537+
"price" => 599.99,
538+
]
539+
];
540+
541+
$response = $this->client->updateFileDetails($fileId, $updateData);
542+
543+
FileTest::assertNull($response->result);
544+
FileTest::assertEquals('Invalid tags parameter for this request', $response->error->message);
545+
}
546+
520547
/**
521548
*
522549
*/

0 commit comments

Comments
 (0)