Skip to content

Commit 9ff016e

Browse files
committed
Merge branch '2.7' into 2.8
* 2.7: 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 a5e574b + 15d3bf8 commit 9ff016e

File tree

2 files changed

+15
-5
lines changed

2 files changed

+15
-5
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()

Tests/LegacySecurityContextTest.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,8 @@ public function testOldConstructorSignature()
8888
{
8989
$authenticationManager = $this->getMockBuilder('Symfony\Component\Security\Core\Authentication\AuthenticationManagerInterface')->getMock();
9090
$accessDecisionManager = $this->getMockBuilder('Symfony\Component\Security\Core\Authorization\AccessDecisionManagerInterface')->getMock();
91-
new SecurityContext($authenticationManager, $accessDecisionManager);
91+
92+
$this->assertInstanceOf('Symfony\Component\Security\Core\SecurityContext', new SecurityContext($authenticationManager, $accessDecisionManager));
9293
}
9394

9495
/**

0 commit comments

Comments
 (0)