File tree Expand file tree Collapse file tree 9 files changed +163
-6
lines changed
Functional/DependencyInjection
Integration/OverblogGraphQLBundle/Fixtures Expand file tree Collapse file tree 9 files changed +163
-6
lines changed Original file line number Diff line number Diff line change 7
7
<xsd : element name =" config" type =" config" />
8
8
9
9
<xsd : simpleType name =" relayMode" >
10
- <xsd : restriction >
10
+ <xsd : restriction base = " xsd:token " >
11
11
<xsd : enumeration value =" modern" />
12
12
<xsd : enumeration value =" classic" />
13
13
</xsd : restriction >
21
21
</xsd : complexType >
22
22
23
23
<xsd : complexType name =" config" >
24
- <xsd : attribute name =" template" type =" xsd:string" />
25
- <xsd : attribute name =" javascript_libraries" type =" javascriptLibraries" />
24
+ <xsd : choice maxOccurs =" unbounded" >
25
+ <xsd : element name =" template" type =" xsd:string" minOccurs =" 0" maxOccurs =" 1" />
26
+ <xsd : element name =" javascript_libraries" type =" javascriptLibraries" minOccurs =" 0" maxOccurs =" 1" />
27
+ </xsd : choice >
26
28
</xsd : complexType >
27
29
</xsd : schema >
Original file line number Diff line number Diff line change @@ -21,7 +21,7 @@ public function registerBundles()
21
21
}
22
22
23
23
/**
24
- * @inheritdoc
24
+ * { @inheritdoc}
25
25
*/
26
26
public function registerContainerConfiguration (LoaderInterface $ loader )
27
27
{
Original file line number Diff line number Diff line change
1
+ <?php
2
+
3
+ namespace Overblog \GraphiQLBundle \Tests \Functional \DependencyInjection \Fixtures \Xml ;
4
+
5
+ use Overblog \GraphiQLBundle \OverblogGraphiQLBundle ;
6
+ use Overblog \GraphiQLBundle \Tests \TestKernel as AbstractTestKernel ;
7
+ use Symfony \Bundle \FrameworkBundle \FrameworkBundle ;
8
+ use Symfony \Bundle \TwigBundle \TwigBundle ;
9
+ use Symfony \Component \Config \Loader \LoaderInterface ;
10
+ use Symfony \Component \DependencyInjection \ContainerBuilder ;
11
+
12
+ final class TestKernel extends AbstractTestKernel
13
+ {
14
+ public function registerBundles ()
15
+ {
16
+ return [
17
+ new FrameworkBundle (),
18
+ new TwigBundle (),
19
+ new OverblogGraphiQLBundle (),
20
+ ];
21
+ }
22
+
23
+ /**
24
+ * {@inheritdoc}
25
+ */
26
+ public function registerContainerConfiguration (LoaderInterface $ loader )
27
+ {
28
+ $ loader ->load (__DIR__ .'/config.xml ' );
29
+ $ loader ->load (function (ContainerBuilder $ container ) {
30
+ $ container ->loadFromExtension ('framework ' , [
31
+ 'assets ' => ['enabled ' => false ],
32
+ ]);
33
+ });
34
+ }
35
+ }
Original file line number Diff line number Diff line change
1
+ <?xml version =" 1.0" encoding =" UTF-8" ?>
2
+ <container xmlns =" http://symfony.com/schema/dic/services"
3
+ xmlns : xsi =" http://www.w3.org/2001/XMLSchema-instance"
4
+ xmlns : framework =" http://symfony.com/schema/dic/symfony"
5
+ xmlns : overblog_graphiql =" http://over-blog.com/schema/dic/overblog_graphiql"
6
+ xsi : schemaLocation =" http://symfony.com/schema/dic/services
7
+ http://symfony.com/schema/dic/services/services-1.0.xsd
8
+ http://symfony.com/schema/dic/symfony
9
+ http://symfony.com/schema/dic/symfony/symfony-1.0.xsd
10
+ http://over-blog.com/schema/dic/overblog_graphiql
11
+ http://over-blog.com/schema/dic/overblog_graphiql/overblog_graphiql-0.1.xsd" >
12
+
13
+ <framework : config
14
+ secret =" secret"
15
+ test =" true" >
16
+ <framework : router resource =" %kernel.root_dir%/app/config/routing.xml" />
17
+ <framework : profiler enabled =" false" />
18
+ <framework : templating >
19
+ <framework : engine >twig</framework : engine >
20
+ </framework : templating >
21
+ </framework : config >
22
+
23
+ <overblog_graphiql : config />
24
+ </container >
Original file line number Diff line number Diff line change
1
+ <?php
2
+
3
+ namespace Overblog \GraphiQLBundle \Tests \Functional \DependencyInjection \Fixtures \Yaml ;
4
+
5
+ use Overblog \GraphiQLBundle \OverblogGraphiQLBundle ;
6
+ use Overblog \GraphiQLBundle \Tests \TestKernel as AbstractTestKernel ;
7
+ use Symfony \Bundle \FrameworkBundle \FrameworkBundle ;
8
+ use Symfony \Bundle \TwigBundle \TwigBundle ;
9
+ use Symfony \Component \Config \Loader \LoaderInterface ;
10
+
11
+ final class TestKernel extends AbstractTestKernel
12
+ {
13
+ public function registerBundles ()
14
+ {
15
+ return [
16
+ new FrameworkBundle (),
17
+ new TwigBundle (),
18
+ new OverblogGraphiQLBundle (),
19
+ ];
20
+ }
21
+
22
+ /**
23
+ * {@inheritdoc}
24
+ */
25
+ public function registerContainerConfiguration (LoaderInterface $ loader )
26
+ {
27
+ $ loader ->load (__DIR__ .'/config.yml ' );
28
+ }
29
+ }
Original file line number Diff line number Diff line change
1
+ framework :
2
+ test : ~
3
+ secret : test
4
+ router :
5
+ resource : " %kernel.root_dir%/../Resources/config/routing.xml"
6
+ templating :
7
+ engines : ['twig']
8
+ profiler :
9
+ enabled : false
10
+ assets :
11
+ enabled : false
12
+
13
+ overblog_graphiql : ~
Original file line number Diff line number Diff line change
1
+ <?php
2
+
3
+ namespace Overblog \GraphiQLBundle \Tests \Functional \DependencyInjection \Xml ;
4
+
5
+ use Overblog \GraphiQLBundle \Tests \Functional \DependencyInjection \Fixtures \Xml \TestKernel ;
6
+ use Overblog \GraphiQLBundle \Tests \TestCase ;
7
+
8
+ final class ConfigurationTest extends TestCase
9
+ {
10
+ protected static function getKernelClass ()
11
+ {
12
+ return TestKernel::class;
13
+ }
14
+
15
+ public function setUp ()
16
+ {
17
+ static ::bootKernel (['test_case ' => str_replace ('\\' , '_ ' , __NAMESPACE__ )]);
18
+ }
19
+
20
+ public function testSuccessConfiguration ()
21
+ {
22
+ /** @var TestKernel $kernel */
23
+ $ kernel = static ::$ kernel ;
24
+
25
+ $ this ->assertTrue ($ kernel ->isBooted ());
26
+ }
27
+ }
Original file line number Diff line number Diff line change
1
+ <?php
2
+
3
+ namespace Overblog \GraphiQLBundle \Tests \Functional \DependencyInjection \Yaml ;
4
+
5
+ use Overblog \GraphiQLBundle \Tests \Functional \DependencyInjection \Fixtures \Yaml \TestKernel ;
6
+ use Overblog \GraphiQLBundle \Tests \TestCase ;
7
+
8
+ final class ConfigurationTest extends TestCase
9
+ {
10
+ protected static function getKernelClass ()
11
+ {
12
+ return TestKernel::class;
13
+ }
14
+
15
+ public function setUp ()
16
+ {
17
+ static ::bootKernel (['test_case ' => str_replace ('\\' , '_ ' , __NAMESPACE__ )]);
18
+ }
19
+
20
+ public function testSuccessConfiguration ()
21
+ {
22
+ /** @var TestKernel $kernel */
23
+ $ kernel = static ::$ kernel ;
24
+
25
+ $ this ->assertTrue ($ kernel ->isBooted ());
26
+ }
27
+ }
Original file line number Diff line number Diff line change 3
3
namespace Overblog \GraphiQLBundle \Tests \Integration \OverblogGraphQLBundle \Fixtures ;
4
4
5
5
use Overblog \GraphiQLBundle \OverblogGraphiQLBundle ;
6
- use Overblog \GraphQLBundle \OverblogGraphQLBundle ;
7
6
use Overblog \GraphiQLBundle \Tests \TestKernel as AbstractTestKernel ;
7
+ use Overblog \GraphQLBundle \OverblogGraphQLBundle ;
8
8
use Symfony \Bundle \FrameworkBundle \FrameworkBundle ;
9
9
use Symfony \Bundle \TwigBundle \TwigBundle ;
10
10
use Symfony \Component \Config \Loader \LoaderInterface ;
@@ -34,7 +34,7 @@ public function registerContainerConfiguration(LoaderInterface $loader)
34
34
'templating ' => ['engine ' => ['twig ' ]],
35
35
'assets ' => ['enabled ' => false ],
36
36
'router ' => [
37
- 'resource ' => __DIR__ . '/Resources/config/routing.xml ' ,
37
+ 'resource ' => __DIR__ . '/Resources/config/routing.xml ' ,
38
38
],
39
39
]);
40
40
});
You can’t perform that action at this time.
0 commit comments