1 | <?php |
||
6 | class Test_Constants extends TestCase { |
||
7 | public function setUp() { |
||
12 | |||
13 | public function tearDown() { |
||
17 | |||
18 | /** |
||
19 | * @covers Automattic\Jetpack\Constants::is_defined |
||
20 | */ |
||
21 | function test_jetpack_constants_is_defined_when_constant_set_via_class() { |
||
25 | |||
26 | /** |
||
27 | * @covers Automattic\Jetpack\Constants::is_defined |
||
28 | */ |
||
29 | function test_jetpack_constants_is_defined_false_when_constant_not_set() { |
||
32 | |||
33 | /** |
||
34 | * @covers Automattic\Jetpack\Constants::is_defined |
||
35 | */ |
||
36 | function test_jetpack_constants_is_defined_true_when_set_with_define() { |
||
39 | |||
40 | /** |
||
41 | * @covers Automattic\Jetpack\Constants::is_defined |
||
42 | */ |
||
43 | function test_jetpack_constants_is_defined_when_constant_set_to_null() { |
||
47 | |||
48 | /** |
||
49 | * @covers Automattic\Jetpack\Constants::get_constant |
||
50 | */ |
||
51 | function test_jetpack_constants_default_to_constant() { |
||
54 | |||
55 | /** |
||
56 | * @covers Automattic\Jetpack\Constants::get_constant |
||
57 | */ |
||
58 | function test_jetpack_constants_get_constant_null_when_not_set() { |
||
61 | |||
62 | /** |
||
63 | * @covers Automattic\Jetpack\Constants::get_constant |
||
64 | */ |
||
65 | function test_jetpack_constants_can_override_previously_defined_constant() { |
||
70 | |||
71 | /** |
||
72 | * @covers Automattic\Jetpack\Constants::get_constant |
||
73 | */ |
||
74 | function test_jetpack_constants_override_to_null_gets_null() { |
||
78 | |||
79 | /** |
||
80 | * @covers Automattic\Jetpack\Constants::set_constant |
||
81 | */ |
||
82 | function test_jetpack_constants_set_constants_adds_to_set_constants_array() { |
||
88 | |||
89 | /** |
||
90 | * @covers Automattic\Jetpack\Constants::clear_constants |
||
91 | */ |
||
92 | function test_jetpack_constants_can_clear_all_constants() { |
||
97 | |||
98 | /** |
||
99 | * @covers Automattic\Jetpack\Constants::clear_single_constant |
||
100 | */ |
||
101 | function test_jetpack_constants_can_clear_single_constant() { |
||
112 | |||
113 | /** |
||
114 | * @covers Automattic\Jetpack\Constants::clear_single_constant |
||
115 | */ |
||
116 | function test_jetpack_constants_can_clear_single_constant_when_null() { |
||
124 | |||
125 | /** |
||
126 | * @covers Automattic\Jetpack\Constants::is_true |
||
127 | */ |
||
128 | function test_jetpack_constants_is_true_method() { |
||
137 | } |
||
138 |
It seems like the type of the argument is not accepted by the function/method which you are calling.
In some cases, in particular if PHP’s automatic type-juggling kicks in this might be fine. In other cases, however this might be a bug.
We suggest to add an explicit type cast like in the following example: