File tree Expand file tree Collapse file tree 3 files changed +33
-3
lines changed
Expand file tree Collapse file tree 3 files changed +33
-3
lines changed Original file line number Diff line number Diff line change 44 - ' 7.1'
55
66before_script :
7- - composer install --dev -v --prefer-source
7+ - php -d memory_limit=-1 composer install --dev -v --prefer-source
88
99script :
1010 - bin/phpspec run -fpretty --verbose
Original file line number Diff line number Diff line change 1+ <?php
2+
3+ namespace spec \Welp \MailchimpBundle \DependencyInjection ;
4+
5+ use PhpSpec \ObjectBehavior ;
6+
7+ class ConfigurationSpec extends ObjectBehavior
8+ {
9+ function it_is_initializable ()
10+ {
11+ $ this ->shouldHaveType ('Welp\MailchimpBundle\DependencyInjection\Configuration ' );
12+ }
13+
14+ function it_is_symfony_configuration ()
15+ {
16+ $ this ->shouldImplement ('Symfony\Component\Config\Definition\ConfigurationInterface ' );
17+ }
18+
19+ function it_gets_config_tree_builder ()
20+ {
21+ $ this
22+ ->getConfigTreeBuilder ()
23+ ->shouldHaveType ('Symfony\Component\Config\Definition\Builder\TreeBuilder ' );
24+ }
25+ }
Original file line number Diff line number Diff line change @@ -17,8 +17,13 @@ class Configuration implements ConfigurationInterface
1717 */
1818 public function getConfigTreeBuilder ()
1919 {
20- $ treeBuilder = new TreeBuilder ();
21- $ rootNode = $ treeBuilder ->root ('welp_mailchimp ' );
20+ $ treeBuilder = new TreeBuilder ('welp_mailchimp ' );
21+
22+ if (method_exists ($ treeBuilder , 'getRootNode ' )) {
23+ $ rootNode = $ treeBuilder ->getRootNode ();
24+ } else {
25+ $ rootNode = $ treeBuilder ->root ('welp_mailchimp ' );
26+ }
2227
2328 $ rootNode
2429 ->children ()
You can’t perform that action at this time.
0 commit comments