Skip to content
This repository was archived by the owner on Sep 16, 2021. It is now read-only.

Commit 241a0c6

Browse files
committed
Testing
1 parent 2d3c381 commit 241a0c6

File tree

31 files changed

+5847
-98
lines changed

31 files changed

+5847
-98
lines changed

DependencyInjection/CmfRoutingAutoExtension.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,8 @@ public function load(array $configs, ContainerBuilder $container)
3333
foreach ($config['auto_route_mapping'] as $classFqn => $config) {
3434
$chainFactoryDef->addMethodCall('registerMapping', array($classFqn, $config));
3535
}
36+
37+
var_dump($container->getParameterBag());die();
3638
}
3739
}
3840

Tests/Functional/App/AppKernel.php

Lines changed: 9 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -1,51 +1,24 @@
11
<?php
22

3-
namespace Symfony\Cmf\Bundle\RoutingAutoBundle\Tests\Functional;
4-
5-
use Symfony\Component\Filesystem\Filesystem;
3+
use Symfony\Cmf\Component\Testing\HttpKernel\TestKernel;
64
use Symfony\Component\Config\Loader\LoaderInterface;
7-
use Symfony\Component\HttpKernel\Kernel;
85

9-
class AppKernel extends Kernel
6+
class AppKernel extends TestKernel
107
{
11-
private $config;
12-
13-
public function __construct($config)
8+
public function configure()
149
{
15-
parent::__construct('test', true);
16-
17-
$fs = new Filesystem();
10+
$this->requireBundleSets(array(
11+
'default', 'phpcr_odm',
12+
));
1813

19-
if (!$fs->isAbsolutePath($config)) {
20-
$config = __DIR__.'/config/'.$config;
21-
}
22-
23-
if (!file_exists($config)) {
24-
throw new \RuntimeException(sprintf('The config file "%s" does not exist.', $config));
25-
}
26-
27-
$this->config = $config;
28-
}
29-
30-
public function registerBundles()
31-
{
32-
return array(
33-
new \Symfony\Bundle\FrameworkBundle\FrameworkBundle(),
34-
new \Symfony\Bundle\MonologBundle\MonologBundle(),
35-
new \Doctrine\Bundle\DoctrineBundle\DoctrineBundle(),
36-
new \Doctrine\Bundle\PHPCRBundle\DoctrinePHPCRBundle(),
14+
$this->addBundles(array(
3715
new \Symfony\Cmf\Bundle\RoutingBundle\CmfRoutingBundle(),
3816
new \Symfony\Cmf\Bundle\RoutingAutoBundle\CmfRoutingAutoBundle(),
39-
);
17+
));
4018
}
4119

4220
public function registerContainerConfiguration(LoaderInterface $loader)
4321
{
44-
$loader->load($this->config);
45-
}
46-
47-
public function getCacheDir()
48-
{
49-
return __DIR__.'/cache';
22+
$loader->load(__DIR__.'/config/config.php');
5023
}
5124
}

Tests/Functional/App/Document/Blog.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?php
22

3-
namespace Symfony\Cmf\Bundle\RoutingAutoBundle\Tests\Functional\app\Document;
3+
namespace Symfony\Cmf\Bundle\RoutingAutoBundle\Tests\Functional\App\Document;
44

55
use Doctrine\ODM\PHPCR\Mapping\Annotations as PHPCR;
66
use Symfony\Cmf\Bundle\RoutingBundle\Mapping\Annotations as CMFRouting;

Tests/Functional/App/Document/Post.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?php
22

3-
namespace Symfony\Cmf\Bundle\RoutingAutoBundle\Tests\Functional\app\Document;
3+
namespace Symfony\Cmf\Bundle\RoutingAutoBundle\Tests\Functional\App\Document;
44

55
use Doctrine\ODM\PHPCR\Mapping\Annotations as PHPCR;
66
use Symfony\Cmf\Bundle\RoutingBundle\Mapping\Annotations as CMFRouting;

Tests/Functional/App/cache/AppTestDebugProjectContainer.php

Lines changed: 3175 additions & 0 deletions
Large diffs are not rendered by default.

Tests/Functional/App/cache/AppTestDebugProjectContainer.php.meta

Lines changed: 1 addition & 0 deletions
Large diffs are not rendered by default.

Tests/Functional/App/cache/AppTestDebugProjectContainer.xml

Lines changed: 2302 additions & 0 deletions
Large diffs are not rendered by default.

Tests/Functional/App/cache/AppTestDebugProjectContainerCompiler.log

Lines changed: 259 additions & 0 deletions
Large diffs are not rendered by default.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
<?php return unserialize('a:0:{}');
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
<?php return unserialize('a:1:{i:0;O:41:"Doctrine\\ODM\\PHPCR\\Mapping\\Annotations\\Id":3:{s:2:"id";b:1;s:4:"type";s:6:"string";s:8:"strategy";N;}}');

0 commit comments

Comments
 (0)