AdminListBlockServiceTest::setUp()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 8

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 8
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 0
1
<?php
2
3
declare(strict_types=1);
4
5
/*
6
 * This file is part of the Sonata Project package.
7
 *
8
 * (c) Thomas Rabaix <[email protected]>
9
 *
10
 * For the full copyright and license information, please view the LICENSE
11
 * file that was distributed with this source code.
12
 */
13
14
namespace Sonata\AdminBundle\Tests\Block;
15
16
use Sonata\AdminBundle\Admin\Pool;
17
use Sonata\AdminBundle\Block\AdminListBlockService;
18
use Sonata\AdminBundle\Templating\TemplateRegistryInterface;
19
use Sonata\BlockBundle\Test\BlockServiceTestCase;
20
21
/**
22
 * @author Sullivan Senechal <[email protected]>
23
 */
24
class AdminListBlockServiceTest extends BlockServiceTestCase
25
{
26
    /**
27
     * @var Pool
28
     */
29
    private $pool;
30
31
    /**
32
     * @var TemplateRegistryInterface
33
     */
34
    private $templateRegistry;
35
36
    protected function setUp(): void
37
    {
38
        parent::setUp();
39
40
        $this->pool = $this->createMock(Pool::class);
41
42
        $this->templateRegistry = $this->prophesize(TemplateRegistryInterface::class);
43
    }
44
45
    public function testDefaultSettings(): void
46
    {
47
        $blockService = new AdminListBlockService($this->twig, $this->pool, $this->templateRegistry->reveal());
0 ignored issues
show
Bug introduced by
The method reveal() does not seem to exist on object<Sonata\AdminBundl...plateRegistryInterface>.

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...
48
        $blockContext = $this->getBlockContext($blockService);
49
50
        $this->assertSettings([
51
            'groups' => false,
52
        ], $blockContext);
53
    }
54
}
55