Commit cd24f841 authored by Tomas Norre Mikkelsen's avatar Tomas Norre Mikkelsen

[TASK] Changing structure of LTSVersionTests

parent 8a8c4eac
Pipeline #3419 failed with stages
in 1 minute and 52 seconds
......@@ -22,7 +22,7 @@ use TYPO3\CMS\Core\Utility\VersionNumberUtility;
class LTSVersionService
{
/**
* @var string
* @var array
*/
public $coreData = '';
......@@ -32,7 +32,7 @@ class LTSVersionService
// Will be automatically update with UpdateCurrentVersionListTask see T3o\Ter\Task\UpdateCurrentVersionListTask
$sourceFile = PATH_site . $GLOBALS['TYPO3_CONF_VARS']['BE']['fileadminDir'] . 'currentcoredata.json';
$json = file_get_contents($sourceFile);
$this->coreData = json_decode($json, true);
$this->setCoreData(json_decode($json, true));
}
/**
......@@ -106,4 +106,12 @@ class LTSVersionService
{
return (int) substr($this->coreData['latest_old_lts'], 0, 1);
}
/**
* @param array $coreData
*/
public function setCoreData(array $coreData)
{
$this->coreData = $coreData;
}
}
\ No newline at end of file
......@@ -33,7 +33,7 @@ class LTSVersionServiceTest extends UnitTestCase
protected function setUp()
{
$this->subject = GeneralUtility::makeInstance(LTSVersionService::class);
$this->subject->coreData = $this->getSampleData();
$this->subject->setCoreData($this->getSampleData());
}
/**
......@@ -79,13 +79,13 @@ class LTSVersionServiceTest extends UnitTestCase
$versions = [
'7' => [
'releases' => [
'7.6.23' => [
'7.6.21' => [
'version' => '7.6.21'
],
'7.6.22' => [
'7.6.20' => [
'version' => '7.6.20'
],
'7.6.21' => [
'7.6.19' => [
'version' => '7.6.19'
],
]
......
Markdown is supported
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