Skip to content

Commit

Permalink
uniqid() more entropy
Browse files Browse the repository at this point in the history
  • Loading branch information
barryvdh committed Jun 2, 2021
1 parent 5c8eb14 commit 0ba09d8
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions src/GatewayTestCase.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ public function testDefaultParametersHaveMatchingMethods()
foreach ($settings as $key => $default) {
$getter = 'get'.ucfirst($this->camelCase($key));
$setter = 'set'.ucfirst($this->camelCase($key));
$value = uniqid();
$value = uniqid('', true);

$this->assertTrue(method_exists($this->gateway, $getter), "Gateway must implement $getter()");
$this->assertTrue(method_exists($this->gateway, $setter), "Gateway must implement $setter()");
Expand Down Expand Up @@ -198,7 +198,7 @@ public function testAuthorizeParameters()
// set property on gateway
$getter = 'get'.ucfirst($this->camelCase($key));
$setter = 'set'.ucfirst($this->camelCase($key));
$value = uniqid();
$value = uniqid('', true);
$this->gateway->$setter($value);

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

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

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

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

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

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

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

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

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

// request should have matching property, with correct value
Expand Down

0 comments on commit 0ba09d8

Please sign in to comment.