-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add time_to_live option to UsernamePasswordAuthenticator
- Loading branch information
Henrik Bjornskov
committed
Sep 15, 2015
1 parent
1ca2278
commit 07d2398
Showing
5 changed files
with
47 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
<?php | ||
|
||
namespace Flint\Bundle\AntennaBundle\Tests\DependencyInjection; | ||
|
||
use Flint\Bundle\AntennaBundle\DependencyInjection\Configuration; | ||
use Matthias\SymfonyConfigTest\PhpUnit\AbstractConfigurationTestCase; | ||
|
||
class ConfigurationTest extends AbstractConfigurationTestCase | ||
{ | ||
protected function getConfiguration() | ||
{ | ||
return new Configuration(); | ||
} | ||
|
||
public function testSecretIsRequired() | ||
{ | ||
$this->assertConfigurationIsInvalid([], 'The child node "secret" at path "antenna" must be configured.'); | ||
} | ||
|
||
/** | ||
* @dataProvider configurationSets | ||
*/ | ||
public function testConfiguration($config, $expectedConfig) | ||
{ | ||
$mergedConfigs = [$config]; | ||
|
||
$this->assertProcessedConfigurationEquals($mergedConfigs, $expectedConfig); | ||
} | ||
|
||
public function configurationSets() | ||
{ | ||
return [ | ||
[['secret' => 'my_secret'], ['secret' => 'my_secret', 'time_to_live' => '7 days']], | ||
[['secret' => 'my_secret', 'time_to_live' => '10 days'], ['secret' => 'my_secret', 'time_to_live' => '10 days']], | ||
]; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters