diff options
Diffstat (limited to 'tests/lib/Security/CSRF/TokenStorage/SessionStorageTest.php')
-rw-r--r-- | tests/lib/Security/CSRF/TokenStorage/SessionStorageTest.php | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/tests/lib/Security/CSRF/TokenStorage/SessionStorageTest.php b/tests/lib/Security/CSRF/TokenStorage/SessionStorageTest.php index 92a6557f8e3..8d4a966efea 100644 --- a/tests/lib/Security/CSRF/TokenStorage/SessionStorageTest.php +++ b/tests/lib/Security/CSRF/TokenStorage/SessionStorageTest.php @@ -29,7 +29,7 @@ class SessionStorageTest extends \Test\TestCase { /** @var \OC\Security\CSRF\TokenStorage\SessionStorage */ private $sessionStorage; - public function setUp() { + protected function setUp(): void { parent::setUp(); $this->session = $this->getMockBuilder(ISession::class) ->disableOriginalConstructor()->getMock(); @@ -54,10 +54,11 @@ class SessionStorageTest extends \Test\TestCase { * @param string $token * @dataProvider getTokenDataProvider * - * @expectedException \Exception - * @expectedExceptionMessage Session does not contain a requesttoken */ public function testGetTokenWithEmptyToken($token) { + $this->expectException(\Exception::class); + $this->expectExceptionMessage('Session does not contain a requesttoken'); + $this->session ->expects($this->once()) ->method('get') |