-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathTicketCustomFieldData.php
More file actions
59 lines (53 loc) · 2.02 KB
/
TicketCustomFieldData.php
File metadata and controls
59 lines (53 loc) · 2.02 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
<?php declare(strict_types=1);
namespace SupportPal\ApiClient\Tests\DataFixtures\Ticket;
use SupportPal\ApiClient\Exception\InvalidArgumentException;
use SupportPal\ApiClient\Model\Ticket\TicketCustomField;
use SupportPal\ApiClient\Tests\DataFixtures\BaseModelData;
use SupportPal\ApiClient\Tests\DataFixtures\Core\BrandData;
use SupportPal\ApiClient\Tests\DataFixtures\Shared\OptionData;
class TicketCustomFieldData extends BaseModelData
{
public const DATA = [
'id' => 1,
'name' => 'Related Product/Service',
'description' => '<div class="sp-editor-content"><p>Please select an option if this ticket is related to one of your products/services.</p></div>',
'purified_description' => '<div class="sp-editor-content"><p>Please select an option if this ticket is related to one of your products/services.</p></div>',
'type' => 5,
'depends_on_field_id' => null,
'depends_on_option_id' => null,
'order' => 0,
'required' => 0,
'public' => 1,
'encrypted' => 0,
'purge' => 0,
'locked' => 0,
'regex' => null,
'regex_error_message' => null,
'created_at' => 1598621911,
'updated_at' => 1598621911,
'options' => [OptionData::DATA,],
'brands' => [BrandData::DATA,],
'departments' => [DepartmentData::DATA,],
'translations' => [TicketCustomFieldTranslationData::DATA,],
];
/**
* @inheritDoc
* @throws InvalidArgumentException
*/
public function getDataWithObjects(): array
{
$data = self::DATA;
$data['options'] = [(new OptionData)->getFilledInstance(),];
$data['brands'] = [(new BrandData)->getFilledInstance(),];
$data['departments'] = [(new DepartmentData)->getFilledInstance(),];
$data['translations'] = [(new TicketCustomFieldTranslationData)->getFilledInstance(),];
return $data;
}
/**
* @inheritDoc
*/
public function getModel(): string
{
return TicketCustomField::class;
}
}