for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace TestMonitor\DevOps\Transforms;
use TestMonitor\DevOps\Resources\Attachment;
trait TransformsAttachments
{
/**
* @param string $attachmentUrl
* @return array
*/
protected function toDevOpsAttachment(string $attachmentUrl): array
return [
[
'op' => 'add',
'path'=> '/relations/-',
'value'=> [
'rel' => 'AttachedFile',
'url' => $attachmentUrl,
'attributes' => [
'comment' => '',
],
];
}
* @param array $attachment
* @return \TestMonitor\DevOps\Resources\Attachment
protected function fromDevOpsAttachment(array $attachment): Attachment
return new Attachment($attachment['url'], $attachment['id']);