These results are based on our legacy PHP analysis, consider migrating to our new PHP analysis engine instead. Learn more
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\AdminStatsBlockService; |
||
18 | use Sonata\BlockBundle\Test\AbstractBlockServiceTestCase; |
||
19 | |||
20 | /** |
||
21 | * @author Sullivan Senechal <[email protected]> |
||
22 | */ |
||
23 | class AdminStatsBlockServiceTest extends AbstractBlockServiceTestCase |
||
24 | { |
||
25 | /** |
||
26 | * @var Pool |
||
27 | */ |
||
28 | private $pool; |
||
29 | |||
30 | protected function setUp(): void |
||
31 | { |
||
32 | parent::setUp(); |
||
33 | |||
34 | $this->pool = $this->getMockBuilder(Pool::class)->disableOriginalConstructor()->getMock(); |
||
0 ignored issues
–
show
|
|||
35 | } |
||
36 | |||
37 | public function testDefaultSettings(): void |
||
38 | { |
||
39 | $blockService = new AdminStatsBlockService('foo', $this->templating, $this->pool); |
||
40 | $blockContext = $this->getBlockContext($blockService); |
||
41 | |||
42 | $this->assertSettings([ |
||
43 | 'icon' => 'fa-line-chart', |
||
44 | 'text' => 'Statistics', |
||
45 | 'translation_domain' => null, |
||
46 | 'color' => 'bg-aqua', |
||
47 | 'code' => false, |
||
48 | 'filters' => [], |
||
49 | 'limit' => 1000, |
||
50 | 'template' => '@SonataAdmin/Block/block_stats.html.twig', |
||
51 | ], $blockContext); |
||
52 | } |
||
53 | } |
||
54 |
Our type inference engine has found an assignment to a property that is incompatible with the declared type of that property.
Either this assignment is in error or the assigned type should be added to the documentation/type hint for that property..