@@ -42,7 +42,7 @@ public function testSwapService()
4242
4343 public function testYahooFinanceProvider ()
4444 {
45- $ config = $ this ->createProvidersConfig (array ('yahoo_finance ' => true ));
45+ $ config = $ this ->createProvidersConfig (array ('yahoo_finance ' => null ));
4646 $ this ->extension ->load ($ config , $ this ->container );
4747
4848 $ definition = $ this ->container ->getDefinition ('florianv_swap.provider.yahoo_finance ' );
@@ -54,7 +54,7 @@ public function testYahooFinanceProvider()
5454
5555 public function testGoogleFinanceProvider ()
5656 {
57- $ config = $ this ->createProvidersConfig (array ('google_finance ' => true ));
57+ $ config = $ this ->createProvidersConfig (array ('google_finance ' => null ));
5858 $ this ->extension ->load ($ config , $ this ->container );
5959
6060 $ definition = $ this ->container ->getDefinition ('florianv_swap.provider.google_finance ' );
@@ -66,7 +66,7 @@ public function testGoogleFinanceProvider()
6666
6767 public function testEuropeanCentralBankProvider ()
6868 {
69- $ config = $ this ->createProvidersConfig (array ('european_central_bank ' => true ));
69+ $ config = $ this ->createProvidersConfig (array ('european_central_bank ' => null ));
7070 $ this ->extension ->load ($ config , $ this ->container );
7171
7272 $ definition = $ this ->container ->getDefinition ('florianv_swap.provider.european_central_bank ' );
@@ -111,6 +111,18 @@ public function testOpenExchangeRatesProvider()
111111 $ this ->assertEquals (array (new Reference ('florianv_swap.client ' ), 'secret ' , true ), $ definition ->getArguments ());
112112 }
113113
114+ public function testWebserviceXProvider ()
115+ {
116+ $ config = $ this ->createProvidersConfig (array ('webservicex ' => null ));
117+ $ this ->extension ->load ($ config , $ this ->container );
118+
119+ $ definition = $ this ->container ->getDefinition ('florianv_swap.provider.webservicex ' );
120+
121+ $ this ->assertFalse ($ definition ->isPublic ());
122+ $ this ->assertTrue ($ definition ->hasTag ('florianv_swap.provider ' ));
123+ $ this ->assertEquals (array (new Reference ('florianv_swap.client ' )), $ definition ->getArguments ());
124+ }
125+
114126 /**
115127 * @expectedException \Symfony\Component\Config\Definition\Exception\InvalidConfigurationException
116128 */
@@ -135,8 +147,8 @@ public function testXigniteProvider()
135147 public function testMultipleProviders ()
136148 {
137149 $ config = $ this ->createProvidersConfig (array (
138- 'yahoo_finance ' => true ,
139- 'google_finance ' => true ,
150+ 'yahoo_finance ' => null ,
151+ 'google_finance ' => null ,
140152 'xignite ' => array ('token ' => 'secret ' )
141153 ));
142154 $ this ->extension ->load ($ config , $ this ->container );
0 commit comments