These results are based on our legacy PHP analysis, consider migrating to our new PHP analysis engine instead. Learn more
1 | <?php |
||
2 | |||
3 | namespace Kunstmaan\AdminBundle\Tests\Helper\AdminPanel; |
||
4 | |||
5 | use Kunstmaan\AdminBundle\Helper\AdminPanel\AdminPanel; |
||
6 | use Kunstmaan\AdminBundle\Helper\AdminPanel\DefaultAdminPanelAdaptor; |
||
7 | use PHPUnit\Framework\TestCase; |
||
8 | |||
9 | /** |
||
10 | * Class AdminPanelActionTest |
||
11 | */ |
||
12 | class AdminPanelTest extends TestCase |
||
13 | { |
||
14 | public function testAdminPanel() |
||
15 | { |
||
16 | $adapter = $this->createMock(DefaultAdminPanelAdaptor::class); |
||
17 | $adapter->expects($this->once())->method('getAdminPanelActions')->willReturn([]); |
||
18 | $panel = new AdminPanel(); |
||
19 | $panel->addAdminPanelAdaptor($adapter); |
||
0 ignored issues
–
show
|
|||
20 | $actions = $panel->getAdminPanelActions(); |
||
21 | $this->assertEmpty($actions); |
||
22 | } |
||
23 | } |
||
24 |
It seems like the type of the argument is not accepted by the function/method which you are calling.
In some cases, in particular if PHP’s automatic type-juggling kicks in this might be fine. In other cases, however this might be a bug.
We suggest to add an explicit type cast like in the following example: