Skip to content
Snippets Groups Projects
Commit c87ba861 authored by Anja Leichsenring's avatar Anja Leichsenring Committed by Christian Kuhn
Browse files

[BUGFIX] Prevent usage of non existing php function in PHP 7.2 tests

The function in question is array_key_first, which was introduced with
PHP 7.3.0. It is not available for PHP 7.2 testing, so a workaround
was introduced.

Resolves: #92343
Releases: master, 10.4
Change-Id: Id0eaceefb4fb5581b8f3a25de8d43819b9389d76
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/65768


Tested-by: default avatarTYPO3com <noreply@typo3.com>
Tested-by: default avatarGeorg Ringer <georg.ringer@gmail.com>
Tested-by: default avatarOliver Bartsch <bo@cedev.de>
Tested-by: default avatarBjörn Jacob <bjoern.jacob@tritum.de>
Tested-by: default avatarChristian Kuhn <lolli@schwarzbu.ch>
Reviewed-by: default avatarGeorg Ringer <georg.ringer@gmail.com>
Reviewed-by: default avatarOliver Bartsch <bo@cedev.de>
Reviewed-by: default avatarBjörn Jacob <bjoern.jacob@tritum.de>
Reviewed-by: default avatarChristian Kuhn <lolli@schwarzbu.ch>
parent 0cab8780
Branches
Tags
No related merge requests found
......@@ -47,7 +47,7 @@ class DashboardPresetRegistryTest extends UnitTestCase
$presets = $this->subject->getDashboardPresets();
self::assertCount(1, $presets);
self::assertEquals('dashboardPreset-fallback', array_key_first($presets));
self::assertSame('dashboardPreset-fallback', key($presets));
self::assertInstanceOf(DashboardPreset::class, reset($presets));
}
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment