• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

api-platform / core / 19799380020

30 Nov 2025 01:09PM UTC coverage: 0.0%. Remained the same
19799380020

push

github

soyuka
Merge 4.2

0 of 306 new or added lines in 35 files covered. (0.0%)

22 existing lines in 15 files now uncovered.

0 of 57173 relevant lines covered (0.0%)

0.0 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

0.0
/src/Doctrine/Odm/Tests/AppKernel.php
1
<?php
2

3
/*
4
 * This file is part of the API Platform project.
5
 *
6
 * (c) Kévin Dunglas <dunglas@gmail.com>
7
 *
8
 * For the full copyright and license information, please view the LICENSE
9
 * file that was distributed with this source code.
10
 */
11

12
declare(strict_types=1);
13

14
namespace ApiPlatform\Doctrine\Odm\Tests;
15

16
use Doctrine\Bundle\MongoDBBundle\DoctrineMongoDBBundle;
17
use Symfony\Bundle\FrameworkBundle\FrameworkBundle;
18
use Symfony\Bundle\FrameworkBundle\Kernel\MicroKernelTrait;
19
use Symfony\Component\Config\Loader\LoaderInterface;
20
use Symfony\Component\DependencyInjection\ContainerBuilder;
21
use Symfony\Component\HttpKernel\Bundle\Bundle;
22
use Symfony\Component\HttpKernel\Kernel;
23
use Symfony\Component\PropertyInfo\Type;
24

25
/**
26
 * AppKernel for tests.
27
 *
28
 * @author Kévin Dunglas <dunglas@gmail.com>
29
 */
30
class AppKernel extends Kernel
31
{
32
    use MicroKernelTrait;
33

34
    public function __construct(string $environment, bool $debug)
35
    {
36
        parent::__construct($environment, $debug);
×
37

38
        // patch for behat/symfony2-extension not supporting %env(APP_ENV)%
39
        $this->environment = $_SERVER['APP_ENV'] ?? $environment;
×
40
    }
41

42
    public function registerBundles(): array
43
    {
44
        return [
×
45
            new FrameworkBundle(),
×
46
            new DoctrineMongoDBBundle(),
×
47
            new class extends Bundle {
×
48
                public function shutdown(): void
49
                {
50
                    restore_exception_handler();
×
51
                }
52
            },
×
53
        ];
×
54
    }
55

56
    public function getProjectDir(): string
57
    {
58
        return __DIR__;
×
59
    }
60

61
    protected function configureRoutes($routes): void
62
    {
63
    }
×
64

65
    protected function configureContainer(ContainerBuilder $c, LoaderInterface $loader): void
66
    {
67
        $c->setParameter('kernel.project_dir', __DIR__);
×
68

69
        $cookie = ['cookie_secure' => true, 'cookie_samesite' => 'lax', 'handler_id' => 'session.handler.native_file'];
×
70
        $config = [
×
71
            'secret' => 'dunglas.fr',
×
72
            'validation' => ['enable_attributes' => true, 'email_validation_mode' => 'html5'],
×
73
            'serializer' => ['enable_attributes' => true],
×
74
            'test' => null,
×
75
            'session' => ['storage_factory_id' => 'session.storage.factory.mock_file'] + $cookie,
×
76
            'profiler' => ['enabled' => false],
×
77
            'property_access' => ['enabled' => true],
×
78
            'php_errors' => ['log' => true],
×
79
            'router' => ['utf8' => true],
×
80
            'http_method_override' => false,
×
81
            'handle_all_throwables' => true,
×
82
            'uid' => ['default_uuid_version' => 7, 'time_based_uuid_version' => 7],
×
83
        ];
×
84

NEW
85
        if (!class_exists(Type::class)) {
×
NEW
86
            $c->setParameter('.json_streamer.lazy_ghosts_dir', __DIR__.'/cache/json_streamer_lazy_ghost');
×
87
        }
88

UNCOV
89
        $c->prependExtensionConfig('framework', $config);
×
90

91
        $loader->load(__DIR__.'/config.yml');
×
92
    }
93

94
    protected function build(ContainerBuilder $container): void
95
    {
96
    }
×
97
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc