File tree 2 files changed +6
-0
lines changed
tests/DependencyInjection
2 files changed +6
-0
lines changed Original file line number Diff line number Diff line change @@ -14,6 +14,11 @@ public function getConfigTreeBuilder()
14
14
$ rootNode
15
15
->children ()
16
16
->scalarNode ('version ' )
17
+ ->beforeNormalization ()
18
+ // force the version to be a string, even if the Yaml config files parsed it as float
19
+ ->ifTrue (function ($ v ) { return !is_string ($ v ) && is_numeric ($ v ); })
20
+ ->then (function ($ v ) { return number_format ($ v , 1 ); })
21
+ ->end ()
17
22
->defaultValue ('3.0 ' )
18
23
->info ('The Keen IO API Version ' )
19
24
->example ('3.0 ' )
Original file line number Diff line number Diff line change @@ -37,5 +37,6 @@ public function testConfiguration()
37
37
$ this ->container ->compile ();
38
38
39
39
$ this ->assertTrue ($ this ->container ->has ('keen_io ' ));
40
+ $ this ->assertInstanceOf ('KeenIO\Client\KeenIOClient ' , $ this ->container ->get ('keen_io ' ));
40
41
}
41
42
}
You can’t perform that action at this time.
0 commit comments