Skip to content

Commit 0ba09d8

Browse files
committed
uniqid() more entropy
1 parent 5c8eb14 commit 0ba09d8

File tree

1 file changed

+11
-11
lines changed

1 file changed

+11
-11
lines changed

src/GatewayTestCase.php

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ public function testDefaultParametersHaveMatchingMethods()
4141
foreach ($settings as $key => $default) {
4242
$getter = 'get'.ucfirst($this->camelCase($key));
4343
$setter = 'set'.ucfirst($this->camelCase($key));
44-
$value = uniqid();
44+
$value = uniqid('', true);
4545

4646
$this->assertTrue(method_exists($this->gateway, $getter), "Gateway must implement $getter()");
4747
$this->assertTrue(method_exists($this->gateway, $setter), "Gateway must implement $setter()");
@@ -198,7 +198,7 @@ public function testAuthorizeParameters()
198198
// set property on gateway
199199
$getter = 'get'.ucfirst($this->camelCase($key));
200200
$setter = 'set'.ucfirst($this->camelCase($key));
201-
$value = uniqid();
201+
$value = uniqid('', true);
202202
$this->gateway->$setter($value);
203203

204204
// request should have matching property, with correct value
@@ -218,7 +218,7 @@ public function testCompleteAuthorizeParameters()
218218
// set property on gateway
219219
$getter = 'get'.ucfirst($this->camelCase($key));
220220
$setter = 'set'.ucfirst($this->camelCase($key));
221-
$value = uniqid();
221+
$value = uniqid('', true);
222222
$this->gateway->$setter($value);
223223

224224
// request should have matching property, with correct value
@@ -238,7 +238,7 @@ public function testCaptureParameters()
238238
// set property on gateway
239239
$getter = 'get'.ucfirst($this->camelCase($key));
240240
$setter = 'set'.ucfirst($this->camelCase($key));
241-
$value = uniqid();
241+
$value = uniqid('', true);
242242
$this->gateway->$setter($value);
243243

244244
// request should have matching property, with correct value
@@ -258,7 +258,7 @@ public function testPurchaseParameters()
258258
// set property on gateway
259259
$getter = 'get'.ucfirst($this->camelCase($key));
260260
$setter = 'set'.ucfirst($this->camelCase($key));
261-
$value = uniqid();
261+
$value = uniqid('', true);
262262
$this->gateway->$setter($value);
263263

264264
// request should have matching property, with correct value
@@ -278,7 +278,7 @@ public function testCompletePurchaseParameters()
278278
// set property on gateway
279279
$getter = 'get'.ucfirst($this->camelCase($key));
280280
$setter = 'set'.ucfirst($this->camelCase($key));
281-
$value = uniqid();
281+
$value = uniqid('', true);
282282
$this->gateway->$setter($value);
283283

284284
// request should have matching property, with correct value
@@ -298,7 +298,7 @@ public function testRefundParameters()
298298
// set property on gateway
299299
$getter = 'get'.ucfirst($this->camelCase($key));
300300
$setter = 'set'.ucfirst($this->camelCase($key));
301-
$value = uniqid();
301+
$value = uniqid('', true);
302302
$this->gateway->$setter($value);
303303

304304
// request should have matching property, with correct value
@@ -318,7 +318,7 @@ public function testVoidParameters()
318318
// set property on gateway
319319
$getter = 'get'.ucfirst($this->camelCase($key));
320320
$setter = 'set'.ucfirst($this->camelCase($key));
321-
$value = uniqid();
321+
$value = uniqid('', true);
322322
$this->gateway->$setter($value);
323323

324324
// request should have matching property, with correct value
@@ -338,7 +338,7 @@ public function testCreateCardParameters()
338338
// set property on gateway
339339
$getter = 'get'.ucfirst($this->camelCase($key));
340340
$setter = 'set'.ucfirst($this->camelCase($key));
341-
$value = uniqid();
341+
$value = uniqid('', true);
342342
$this->gateway->$setter($value);
343343

344344
// request should have matching property, with correct value
@@ -358,7 +358,7 @@ public function testDeleteCardParameters()
358358
// set property on gateway
359359
$getter = 'get'.ucfirst($this->camelCase($key));
360360
$setter = 'set'.ucfirst($this->camelCase($key));
361-
$value = uniqid();
361+
$value = uniqid('', true);
362362
$this->gateway->$setter($value);
363363

364364
// request should have matching property, with correct value
@@ -378,7 +378,7 @@ public function testUpdateCardParameters()
378378
// set property on gateway
379379
$getter = 'get'.ucfirst($this->camelCase($key));
380380
$setter = 'set'.ucfirst($this->camelCase($key));
381-
$value = uniqid();
381+
$value = uniqid('', true);
382382
$this->gateway->$setter($value);
383383

384384
// request should have matching property, with correct value

0 commit comments

Comments
 (0)