@@ -110,6 +110,24 @@ public function testWithData()
110110 self ::assertInstanceOf (Client::class, $ result );
111111 }
112112
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+
113131 public function testWithDataException ()
114132 {
115133 $ instance = $ this ->getTestedClassInstance ();
@@ -135,6 +153,20 @@ public function testWithFileJsonConfig(): Client
135153 return $ result ;
136154 }
137155
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+
138170 /**
139171 * @throws BitPayGenericException
140172 */
@@ -145,6 +177,19 @@ public function testWithFileYmlConfig()
145177 self ::assertInstanceOf (Client::class, $ result );
146178 }
147179
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+
148193 public function testWithFileException ()
149194 {
150195 $ instance = $ this ->getTestedClassInstance ();
0 commit comments