class UpdateControllerTest extends TestCase
{ public function testCheckForUpdatesNoUpdate(): void
{ $apiClient =
$this->
createMock(ApiClient::
class);
$apiClient ->
method('checkForUpdates'
) ->
willReturn(new Version(['version' => '6.5.1.0', 'date' => '2020-01-01'
]));
$updateController =
new UpdateController( $apiClient,
$this->
createMock(WriteableCheck::
class),
$this->
createMock(LicenseCheck::
class),
$this->
createMock(ExtensionCompatibility::
class),
$this->
createMock(EventDispatcherInterface::
class),
$this->
createMock(SystemConfigService::
class),
$this->
createMock(AbstractExtensionLifecycle::
class),
'6.5.1.0'
);
$response =
$updateController->
updateApiCheck();