Project

General

Profile

Actions

Bug #64066

closed

Testingframework record collector does not reset internal variables

Added by Bernhard Kraft over 9 years ago. Updated over 5 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
Tests
Target version:
Start date:
2014-12-31
Due date:
% Done:

100%

Estimated time:
3.00 h
TYPO3 Version:
7
PHP Version:
5.3
Tags:
Complexity:
medium
Is Regression:
No
Sprint Focus:

Description

When using the Unit-Test framework frontend record collector [1] the resulting response is invalid.

Instead of adding records only to the specific section (configured via TypoScript) the records pile up in $this->records and get added to every section. The reason this only true for $this->records of the Collector is, that for the other class variables (like $this->structure) they are using appropriate array keys anyways.

My proposed solution is to reset the internal member variables: records, structure and structurePath each time after attaching a section. See patch on gerrit.

[1] https://git.typo3.org/Packages/TYPO3.CMS.git/blob/HEAD:/typo3/sysext/core/Tests/Functional/Framework/Frontend/Collector.php

Actions

Also available in: Atom PDF