Skip to content

Commit 541e423

Browse files
Merge branch '2.7' into 2.8
* 2.7: Refactoring tests.
2 parents 95f1d66 + 395419c commit 541e423

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

Tests/Authorization/AuthorizationCheckerTest.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -61,9 +61,9 @@ public function testVoteAuthenticatesTokenIfNecessary()
6161
->will($this->returnValue(true));
6262

6363
// first run the token has not been re-authenticated yet, after isGranted is called, it should be equal
64-
$this->assertFalse($newToken === $this->tokenStorage->getToken());
64+
$this->assertNotSame($newToken, $this->tokenStorage->getToken());
6565
$this->assertTrue($this->authorizationChecker->isGranted('foo'));
66-
$this->assertTrue($newToken === $this->tokenStorage->getToken());
66+
$this->assertSame($newToken, $this->tokenStorage->getToken());
6767
}
6868

6969
/**
@@ -90,7 +90,7 @@ public function testIsGranted($decide)
9090
->method('decide')
9191
->will($this->returnValue($decide));
9292
$this->tokenStorage->setToken($token);
93-
$this->assertTrue($decide === $this->authorizationChecker->isGranted('ROLE_FOO'));
93+
$this->assertSame($decide, $this->authorizationChecker->isGranted('ROLE_FOO'));
9494
}
9595

9696
public function isGrantedProvider()

Tests/LegacySecurityContextTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ public function testGetTokenDelegation()
4141
->method('getToken')
4242
->will($this->returnValue($token));
4343

44-
$this->assertTrue($token === $this->securityContext->getToken());
44+
$this->assertSame($token, $this->securityContext->getToken());
4545
}
4646

4747
public function testSetTokenDelegation()

0 commit comments

Comments
 (0)