Project

General

Profile

Actions

Task #67468

closed

Get rid of eval() in unit tests

Added by Christian Kuhn almost 9 years ago. Updated over 6 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
Tests
Target version:
Start date:
2015-06-15
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
7
PHP Version:
5.6
Tags:
Complexity:
medium
Sprint Focus:
Remote Sprint

Description

There are a number of unit tests that use eval() to extend the 'class under test' and open protected method by setting them to public in order to test a certain method directly that is otherwise not accessible from the outside. This is usually done for static classes.

Using eval() is rather ugly. The patch from issue #67113 picks one of these evals() and moves it to a fixture file instead. The patch can be used as an example on how to get rid of these eval() calls. As a benefit, tests will be more easy to read, debug and understand.

Other places can be found by looking for calls to eval() in unit test class files.

This issue could be used as an umbrella issue and was written for the Paris sprint. Specific patches for single file changes can be added to own issues that are related or child of this one here.


Related issues 17 (0 open17 closed)

Related to TYPO3 Core - Task #67113: ExtensionManagementUtilityTestClosed2015-05-22

Actions
Related to TYPO3 Core - Bug #67485: eval() in scheduler testsClosed2015-06-16

Actions
Related to TYPO3 Core - Bug #67489: eval() in abstract backend testsClosedAlexander Krist2015-06-16

Actions
Related to TYPO3 Core - Bug #67490: eval() in array utility testsClosedAlexander Krist2015-06-16

Actions
Related to TYPO3 Core - Bug #67525: eval() in uri builder testsClosedAlexander Krist2015-06-16

Actions
Related to TYPO3 Core - Task #67591: eval() in tree data provider testClosedPierrick Caillon2015-06-18

Actions
Related to TYPO3 Core - Task #67594: eval() in version number utility testClosedPierrick Caillon2015-06-18

Actions
Related to TYPO3 Core - Task #67596: eval() in path utility testsClosedPierrick Caillon2015-06-18

Actions
Related to TYPO3 Core - Task #67600: eval() in general utility testsClosedPierrick Caillon2015-06-18

Actions
Related to TYPO3 Core - Bug #67601: eval() in field provider testClosedAlexander Krist2015-06-18

Actions
Related to TYPO3 Core - Task #67604: eval() in mailer testClosedPierrick Caillon2015-06-18

Actions
Related to TYPO3 Core - Task #67606: eval() in data handler testClosedPierrick Caillon2015-06-18

Actions
Related to TYPO3 Core - Task #67651: Removes eval() in BackendUtilityTestClosed2015-06-20

Actions
Related to TYPO3 Core - Task #67664: Removes eval() in Unit TestsClosed2015-06-21

Actions
Related to TYPO3 Core - Story #67665: Removes eval() in extbase Unit TestsClosed2015-08-06

Actions
Related to TYPO3 Core - Task #67666: Removes eval() in fluid Unit TestsClosedOliver Eglseder2015-06-21

Actions
Related to TYPO3 Core - Task #67667: Removes eval() in core Unit TestsClosed2015-06-21

Actions
Actions

Also available in: Atom PDF