Issue Bug Closed

#64066Testingframework record collector does not reset internal variables

Bernhard Kraft 12/31/14, 15:11 updated 10/02/18, 11:48

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

Reviews 1