[TYPO3-core] RFC: #14405: Rename the test cases from *_testcase to *Test

Stefano Kowalke blueduck at gmx.net
Mon May 17 13:17:38 CEST 2010


Hi,

this is SVN patch request.


Type: enhancement

Branches: trunk

BT reference: http://bugs.typo3.org/view.php?id=14405


Problem:
The testcases was named like regularexpression_testcase.php back in the
good old days, when Robert Lemke started with using PHPUnit for TYPO3.

The appendix _testcase was used as a keyword for finding all files with
test cases by the extension phpunit [1]. This works fine, if you call
the files from inside the Backend with phpunit, but for various reasons
(e.g. Continous Integration) you have to call the tests from CLI with
the cli_dispatcher.

In this context phpunit extension pass the given arguements to PHPUnit
[2], where the test executed at the end.

But PHPUnit from Sebastian Bergmann looks for files with *Test.php if
you call it like

phpunit --some-args tests/

So it never will find any file/test in tests/ and phpunit also won´t if
you call it from CLI.


Solution:
Rename the files and classes


Steps to reproduce:
1) Get a phpunit version lower than 3.4.12 from TER [3] or SVN [4]
2) Create a BE-User called: _cli_phpunit
3) open a CLI inside a working T3 installation on root level
4) call the cli_dispatcher by this command:
php typo3/cli_dispatch.phpsh phpunit tests/


How to test:
1) Get the current version of phpunit from TER [3] or SVN [4]
2) Create a BE-User called: _cli_phpunit
3) apply the patch / rename the files and classes
4) open a CLI inside a working T3 installation on root level
5) call the cli_dispatcher by this command:
php typo3/cli_dispatch.phpsh phpunit tests/


[1] http://forge.typo3.org/projects/show/extension-phpunit
[2] http://www.phpunit.de/
[3] http://typo3.org/extensions/repository/view/phpunit/current/
[4] https://svn.typo3.org/TYPO3v4/Extensions/phpunit/

Regards
Stefano
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: 14405.diff
URL: <http://lists.typo3.org/pipermail/typo3-team-core/attachments/20100517/50f0934a/attachment-0001.asc>


More information about the TYPO3-team-core mailing list