diff --git a/Classes/Core/Functional/Framework/DataHandling/DataSet.php b/Classes/Core/Functional/Framework/DataHandling/DataSet.php index 0fbdbf60..283db6ec 100644 --- a/Classes/Core/Functional/Framework/DataHandling/DataSet.php +++ b/Classes/Core/Functional/Framework/DataHandling/DataSet.php @@ -160,9 +160,9 @@ public function getHashIndex(string $tableName): ?int * Return a list of rows of given table. Keys are the uid or hash * index fields of that table. */ - public function getElements(string $tableName): ?array + public function getElements(string $tableName): array { - $elements = null; + $elements = []; if (isset($this->data[$tableName]['elements'])) { $elements = $this->data[$tableName]['elements']; } diff --git a/Classes/Core/Functional/FunctionalTestCase.php b/Classes/Core/Functional/FunctionalTestCase.php index 1f75ffd4..efd03ffc 100644 --- a/Classes/Core/Functional/FunctionalTestCase.php +++ b/Classes/Core/Functional/FunctionalTestCase.php @@ -580,7 +580,7 @@ protected function assertCSVDataSet(string $fileName): void $hasUidField = ($dataSet->getIdIndex($tableName) !== null); $hasHashField = ($dataSet->getHashIndex($tableName) !== null); $records = $this->getAllRecords($tableName, $hasUidField, $hasHashField); - $assertions = (array)$dataSet->getElements($tableName); + $assertions = $dataSet->getElements($tableName); foreach ($assertions as $assertion) { $result = $this->assertInRecords($assertion, $records); if ($result === false) {