"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "public_html/lists/base/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Tests/Authentication/RememberMe/InMemoryTokenProviderTest.php" between
phplist-3.4.5.tgz and phplist-3.4.6.tgz

About: phpList is a one-way email announcement delivery system for newsletters, publicity lists, notifications, and many other uses (requires PHP and MySQL).

InMemoryTokenProviderTest.php  (phplist-3.4.5.tgz):InMemoryTokenProviderTest.php  (phplist-3.4.6.tgz)
skipping to change at line 30 skipping to change at line 30
public function testCreateNewToken() public function testCreateNewToken()
{ {
$provider = new InMemoryTokenProvider(); $provider = new InMemoryTokenProvider();
$token = new PersistentToken('foo', 'foo', 'foo', 'foo', new \DateTime() ); $token = new PersistentToken('foo', 'foo', 'foo', 'foo', new \DateTime() );
$provider->createNewToken($token); $provider->createNewToken($token);
$this->assertSame($provider->loadTokenBySeries('foo'), $token); $this->assertSame($provider->loadTokenBySeries('foo'), $token);
} }
/**
* @expectedException \Symfony\Component\Security\Core\Exception\TokenNotFou
ndException
*/
public function testLoadTokenBySeriesThrowsNotFoundException() public function testLoadTokenBySeriesThrowsNotFoundException()
{ {
$this->expectException('Symfony\Component\Security\Core\Exception\TokenN otFoundException');
$provider = new InMemoryTokenProvider(); $provider = new InMemoryTokenProvider();
$provider->loadTokenBySeries('foo'); $provider->loadTokenBySeries('foo');
} }
public function testUpdateToken() public function testUpdateToken()
{ {
$provider = new InMemoryTokenProvider(); $provider = new InMemoryTokenProvider();
$token = new PersistentToken('foo', 'foo', 'foo', 'foo', new \DateTime() ); $token = new PersistentToken('foo', 'foo', 'foo', 'foo', new \DateTime() );
$provider->createNewToken($token); $provider->createNewToken($token);
$provider->updateToken('foo', 'newFoo', $lastUsed = new \DateTime()); $provider->updateToken('foo', 'newFoo', $lastUsed = new \DateTime());
$token = $provider->loadTokenBySeries('foo'); $token = $provider->loadTokenBySeries('foo');
$this->assertEquals('newFoo', $token->getTokenValue()); $this->assertEquals('newFoo', $token->getTokenValue());
$this->assertSame($token->getLastUsed(), $lastUsed); $this->assertSame($token->getLastUsed(), $lastUsed);
} }
/**
* @expectedException \Symfony\Component\Security\Core\Exception\TokenNotFou
ndException
*/
public function testDeleteToken() public function testDeleteToken()
{ {
$this->expectException('Symfony\Component\Security\Core\Exception\TokenN otFoundException');
$provider = new InMemoryTokenProvider(); $provider = new InMemoryTokenProvider();
$token = new PersistentToken('foo', 'foo', 'foo', 'foo', new \DateTime() ); $token = new PersistentToken('foo', 'foo', 'foo', 'foo', new \DateTime() );
$provider->createNewToken($token); $provider->createNewToken($token);
$provider->deleteTokenBySeries('foo'); $provider->deleteTokenBySeries('foo');
$provider->loadTokenBySeries('foo'); $provider->loadTokenBySeries('foo');
} }
} }
 End of changes. 4 change blocks. 
8 lines changed or deleted 2 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)