| 1 | <?php |
||
| 13 | class ComposerUpdateExtensionTest extends SapphireTest |
||
| 14 | { |
||
| 15 | protected static $fixture_file = 'ComposerUpdateExtensionTest.yml'; |
||
| 16 | |||
| 17 | protected $requiredExtensions = [ |
||
| 18 | Package::class => [ |
||
| 19 | ComposerUpdateExtension::class, |
||
| 20 | ], |
||
| 21 | ]; |
||
| 22 | |||
| 23 | public function testAvailableVersionIsNotShownWhenSameAsCurrent() |
||
| 29 | |||
| 30 | public function testAvailableVersionIsShown() |
||
| 36 | } |
||
| 37 |
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: