Skip to content

Commit 9854d00

Browse files
committed
Merge branch '2.8' into 3.2
* 2.8: Allow Upper Case property names fix some risky tests bumped Symfony version to 2.7.27 updated VERSION for 2.7.26 update CONTRIBUTORS for 2.7.26 updated CHANGELOG for 2.7.26
2 parents fe45d4f + 9ff016e commit 9854d00

File tree

1 file changed

+13
-4
lines changed

1 file changed

+13
-4
lines changed

Tests/Encoder/BCryptPasswordEncoderTest.php

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -39,11 +39,20 @@ public function testCostAboveRange()
3939
new BCryptPasswordEncoder(32);
4040
}
4141

42-
public function testCostInRange()
42+
/**
43+
* @dataProvider validRangeData
44+
*/
45+
public function testCostInRange($cost)
46+
{
47+
$this->assertInstanceOf('Symfony\Component\Security\Core\Encoder\BCryptPasswordEncoder', new BCryptPasswordEncoder($cost));
48+
}
49+
50+
public function validRangeData()
4351
{
44-
for ($cost = 4; $cost <= 31; ++$cost) {
45-
new BCryptPasswordEncoder($cost);
46-
}
52+
$costs = range(4, 31);
53+
array_walk($costs, function (&$cost) { $cost = array($cost); });
54+
55+
return $costs;
4756
}
4857

4958
public function testResultLength()

0 commit comments

Comments
 (0)