Completed
Push — symfony5 ( 074008...b11eb2 )
by
unknown
267:19 queued 255:17
created

QueryRenderingExtensionTest   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 21
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Importance

Changes 0
Metric Value
dl 0
loc 21
rs 10
c 0
b 0
f 0
wmc 2
lcom 0
cbo 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A getExtensions() 0 13 1
A getFixturesDir() 0 4 1
1
<?php
2
3
/**
4
 * @copyright Copyright (C) eZ Systems AS. All rights reserved.
5
 * @license For full copyright and license information view LICENSE file distributed with this source code.
6
 */
7
declare(strict_types=1);
8
9
namespace eZ\Publish\Core\MVC\Symfony\Templating\Tests\Twig\Extension;
10
11
use eZ\Publish\Core\MVC\Symfony\Templating\Twig\Extension\QueryRenderingExtension;
12
use Symfony\Component\HttpKernel\Fragment\FragmentHandler;
13
14
final class QueryRenderingExtensionTest extends FileSystemTwigIntegrationTestCase
15
{
16
    protected function getExtensions(): array
17
    {
18
        $fragmentHandler = $this->createMock(FragmentHandler::class);
19
        $fragmentHandler
0 ignored issues
show
Bug introduced by
The method method() does not seem to exist on object<PHPUnit\Framework\MockObject\MockObject>.

This check looks for calls to methods that do not seem to exist on a given type. It looks for the method on the type itself as well as in inherited classes or implemented interfaces.

This is most likely a typographical error or the method has been renamed.

Loading history...
20
            ->method('render')
21
            ->willReturnCallback(static function (...$args): string {
22
                return var_export($args, true);
23
            });
24
25
        return [
26
            new QueryRenderingExtension($fragmentHandler),
27
        ];
28
    }
29
30
    protected function getFixturesDir(): string
31
    {
32
        return __DIR__ . '/_fixtures/query_rendering_functions/';
33
    }
34
}
35