test: Fix assertion of SecurityComponentTest::testCsrfNonceVacuum()

This commit is contained in:
Koji Tanaka 2023-01-07 20:03:00 +09:00 committed by Kamil Wylegala
parent 7e4adb37e5
commit 40d5f32516

View file

@ -1489,7 +1489,7 @@ class SecurityComponentTest extends CakeTestCase {
$this->Security->startup($this->Controller);
$tokens = $this->Security->Session->read('_Token.csrfTokens');
$this->assertEquals(2, count($tokens), 'Too many tokens left behind');
$this->assertNotEmpty('valid', $tokens, 'Valid token was removed.');
$this->assertNotEmpty($tokens['valid'], 'Valid token was removed.');
}
/**