| Conditions | 1 |
| Paths | 1 |
| Total Lines | 14 |
| Code Lines | 8 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 14 | public function itShouldLoadGlobalConfig() |
||
| 15 | { |
||
| 16 | $command = $this->getApplication()->find('config:data:acl'); |
||
|
|
|||
| 17 | |||
| 18 | $commandTester = new CommandTester($command); |
||
| 19 | $commandTester->execute( |
||
| 20 | array( |
||
| 21 | 'command' => 'config:data:acl', |
||
| 22 | ) |
||
| 23 | ); |
||
| 24 | |||
| 25 | $this->assertContains('All Stores', $commandTester->getDisplay()); |
||
| 26 | $this->assertContains('Magento_Reports::salesroot_sales', $commandTester->getDisplay()); |
||
| 27 | } |
||
| 28 | } |
||
| 29 |
It seems like the method you are trying to call exists only in some of the possible types.
Let’s take a look at an example:
Available Fixes
Add an additional type-check:
Only allow a single type to be passed if the variable comes from a parameter: