Skip to content

Commit

Permalink
Merge pull request #25 from remmel/master
Browse files Browse the repository at this point in the history
Be able to set array.rates without historicalRates
  • Loading branch information
florianv committed Mar 11, 2019
2 parents ce98b5b + 6f0ca95 commit 0dbb22e
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
1 change: 0 additions & 1 deletion DependencyInjection/Configuration.php
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,6 @@ public function getConfigTreeBuilder()
->variableNode('historicalRates')
->treatFalseLike(null)
->treatTrueLike(null)
->isRequired()
->cannotBeEmpty()
->validate()
->ifTrue(function($config) {
Expand Down
9 changes: 8 additions & 1 deletion Tests/DependencyInjection/ConfigurationTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,14 @@ public function provideValidProvidersConfigs()
],
],
]],
[[
'array' => [
'rates' => [
'EUR/USD' => 1.1,
'EUR/GBP' => 1.5,
],
],
]],
];
}

Expand All @@ -165,7 +173,6 @@ public function provideInvalidProvidersConfigs()
[['array' => null]],
[['array' => []]],
[['array' => ['EUR/GBP' => 1.5]]],
[['array' => ['rates' => ['EUR/GBP' => 1.5]]]],
[['array' => ['rates' => [['EUR/GBP' => 0]]]]],
[['array' => ['rates' => [['any' => 'any']]]]],
[['array' => ['rates' => [['2017-01-01' => 'any']]]]],
Expand Down

0 comments on commit 0dbb22e

Please sign in to comment.