@@ 32-42 (lines=11) @@ | ||
29 | $this->assertEquals('Main content', $result->getName()); |
|
30 | } |
|
31 | ||
32 | public function testParseSf3Flow() |
|
33 | { |
|
34 | $kernel = $this->createMock(KernelInterface::class); |
|
35 | $kernel->method('locateResource')->willReturn(__DIR__ . '/Resources/config/pageparts/main.yml'); |
|
36 | ||
37 | $pagePartConfigurationParser = new PagePartConfigurationParser($kernel, []); |
|
38 | ||
39 | $result = $pagePartConfigurationParser->parse('MyWebsiteBundle:main'); |
|
40 | $this->assertInstanceOf(PagePartAdminConfiguratorInterface::class, $result); |
|
41 | $this->assertEquals('Main content', $result->getName()); |
|
42 | } |
|
43 | ||
44 | public function testPresetExtendsBundle() |
|
45 | { |
@@ 30-40 (lines=11) @@ | ||
27 | $this->assertEquals('Content page', $result->getName()); |
|
28 | } |
|
29 | ||
30 | public function testParseSf3Flow() |
|
31 | { |
|
32 | $kernel = $this->createMock(KernelInterface::class); |
|
33 | $kernel->method('locateResource')->willReturn(__DIR__ . '/Resources/config/pagetemplates/test.yml'); |
|
34 | ||
35 | $pageTemplateConfigurationParser = new PageTemplateConfigurationParser($kernel, []); |
|
36 | ||
37 | $result = $pageTemplateConfigurationParser->parse('MyWebsiteBundle:test'); |
|
38 | $this->assertInstanceOf(PageTemplate::class, $result); |
|
39 | $this->assertEquals('Test page', $result->getName()); |
|
40 | } |
|
41 | } |
|
42 |