-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtest-source-lists.php
executable file
·62 lines (51 loc) · 1.13 KB
/
test-source-lists.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
54
55
56
57
58
59
60
61
62
<?php
/**
* Class Test_Image_Sources
*
* @package Respect_Art_Direction
*/
/**
* Test Image Source functionality.
*/
class Test_Image_Sources extends WP_UnitTestCase {
/**
* A single example test.
*/
function test_rad_add_source_list() {
global $rad_source_lists;
$this->assertEquals( $rad_source_lists, array() );
rad_add_source_list( 'test_source', array(
'image_size_1',
'image_size_2',
) );
$this->assertEquals( $rad_source_lists, array(
'test_source' => array(
'image_size_1',
'image_size_2',
),
) );
rad_add_source_list( 'test_source_2', array(
'image_size_3',
'image_size_4',
) );
$this->assertEquals( $rad_source_lists, array(
'test_source' => array(
'image_size_1',
'image_size_2',
),
'test_source_2' => array(
'image_size_3',
'image_size_4'
),
) );
$rad_source_lists = array();
}
/**
* Test rad_image_size_is_image_source().
*/
function test_rad_image_size_is_image_source() {
rad_add_source_list( 'another_test_source' );
$this->assertTrue( rad_image_size_is_image_source( 'another_test_source' ) );
$rad_source_lists = array();
}
}