1 | <?php // phpcs:ignore WordPress.Files.FileName.InvalidClassFileName |
||
15 | class SignatureTest extends TestCase { |
||
16 | /** |
||
17 | * Tests the Jetpack_Signature->join_with_equal_sign() method. |
||
18 | * |
||
19 | * @covers Automattic\Jetpack\Connection\Jetpack_Signature->join_with_equal_sign |
||
20 | * @dataProvider join_with_equal_sign_data_provider |
||
21 | * |
||
22 | * @param string $name Query string key value. |
||
23 | * @param string|array $value Associated value for query string key. |
||
24 | * @param string|array $expected_output The expected output of $signature->join_with_equal_sign. |
||
25 | */ |
||
26 | public function test_join_with_equal_sign( $name, $value, $expected_output ) { |
||
30 | |||
31 | /** |
||
32 | * Data provider for test_join_with_equal_sign. |
||
33 | * |
||
34 | * The test data arrays have the format: |
||
35 | * 'name' => The value that the constant will be set to. Null if the constant will not be set. |
||
36 | * 'value' => The name of the constant. |
||
37 | * 'expected_output' => The expected output of $signature->join_with_equal_sign. |
||
38 | */ |
||
39 | public function join_with_equal_sign_data_provider() { |
||
102 | |||
103 | /** |
||
104 | * Tests the Jetpack_Signature->normalized_query_parameters() method. |
||
105 | * |
||
106 | * @covers Automattic\Jetpack\Connection\Jetpack_Signature->normalized_query_parameters |
||
107 | * @dataProvider normalized_query_parameters_data_provider |
||
108 | * |
||
109 | * @param string $query_string Query string key value. |
||
110 | * @param string|array $expected_output The expected output of $signature->normalized_query_parameters. |
||
111 | */ |
||
112 | public function test_normalized_query_parameters( $query_string, $expected_output ) { |
||
116 | |||
117 | /** |
||
118 | * Data provider for test_join_with_equal_sign. |
||
119 | * |
||
120 | * The test data arrays have the format: |
||
121 | * 'name' => The value that the constant will be set to. Null if the constant will not be set. |
||
122 | * 'value' => The name of the constant. |
||
123 | * 'expected_output' => The expected output of $signature->normalized_query_parameters(). |
||
124 | */ |
||
125 | public function normalized_query_parameters_data_provider() { |
||
158 | } |
||
159 |
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: