@@ -110,6 +110,24 @@ public function testWithData()
110
110
self ::assertInstanceOf (Client::class, $ result );
111
111
}
112
112
113
+ /**
114
+ * @throws BitPayApiException
115
+ */
116
+ public function testWithDataAndXBitPayPlatformInfoHeader ()
117
+ {
118
+ $ tokens = $ this ->createMock (Tokens::class);
119
+ $ result = $ this ->getTestedClassInstance ()::createWithData (
120
+ Env::TEST ,
121
+ __DIR__ . '/bitpay_private_test.key ' ,
122
+ $ tokens ,
123
+ 'YourMasterPassword ' ,
124
+ null ,
125
+ 'MyPlatform_v1.0.0 '
126
+ );
127
+
128
+ self ::assertInstanceOf (Client::class, $ result );
129
+ }
130
+
113
131
public function testWithDataException ()
114
132
{
115
133
$ instance = $ this ->getTestedClassInstance ();
@@ -135,6 +153,20 @@ public function testWithFileJsonConfig(): Client
135
153
return $ result ;
136
154
}
137
155
156
+ /**
157
+ * @throws BitPayApiException
158
+ */
159
+ public function testWithFileJsonConfigAndXBitPayPlatformInfoHeader (): Client
160
+ {
161
+ $ instance = $ this ->getTestedClassInstance ();
162
+ $ result = $ instance ::createWithFile (
163
+ __DIR__ . '/BitPay.config-unit.json ' ,
164
+ 'MyPlatform_v1.0.0 '
165
+ );
166
+ self ::assertInstanceOf (Client::class, $ result );
167
+ return $ result ;
168
+ }
169
+
138
170
/**
139
171
* @throws BitPayGenericException
140
172
*/
@@ -145,6 +177,19 @@ public function testWithFileYmlConfig()
145
177
self ::assertInstanceOf (Client::class, $ result );
146
178
}
147
179
180
+ /**
181
+ * @throws BitPayGenericException
182
+ */
183
+ public function testWithFileYmlConfigAndXBitPayPlatformInfoHeader ()
184
+ {
185
+ $ instance = $ this ->getTestedClassInstance ();
186
+ $ result = $ instance ::createWithFile (
187
+ __DIR__ . '/BitPay.config-unit.yml ' ,
188
+ 'MyPlatform_v1.0.0 '
189
+ );
190
+ self ::assertInstanceOf (Client::class, $ result );
191
+ }
192
+
148
193
public function testWithFileException ()
149
194
{
150
195
$ instance = $ this ->getTestedClassInstance ();
0 commit comments