-
Notifications
You must be signed in to change notification settings - Fork 22
/
Copy pathtrait-send-lists-setup.php
53 lines (51 loc) · 1.17 KB
/
trait-send-lists-setup.php
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
<?php
/**
* Class Newsletters Test Send_List
*
* @package Newspack_Newsletters
*/
use Newspack\Newsletters\Send_List;
use Newspack\Newsletters\Send_Lists;
/**
* Traits for the Send_List and Send_Lists test classes
*/
trait Send_Lists_Setup {
/**
* Array of send list config objects for testing.
*
* @var array
*/
public static $configs = [
// Missing required properties, plus invalid values.
'invalid' => [
'provider' => 'invalid_provider',
'type' => 'invalid_type',
],
'valid_list' => [
'provider' => 'mailchimp',
'type' => 'list',
'id' => '123',
'name' => 'Valid List',
'entity_type' => 'Audience',
'count' => 100,
],
// Missing parent ID.
'invalid_sublist' => [
'provider' => 'mailchimp',
'type' => 'sublist',
'id' => '456',
'name' => 'Valid Sublist',
'entity_type' => 'Group',
'count' => 50,
],
'valid_sublist' => [
'provider' => 'mailchimp',
'type' => 'sublist',
'id' => '456',
'parent' => '123',
'name' => 'Valid Sublist',
'entity_type' => 'Group',
'count' => 50,
],
];
}