[TYPO3-dev] Unit and functional tests for extensions with 7.4
Nicolas de Haen
typo3 at ndh-websolutions.de
Wed Sep 2 00:34:38 CEST 2015
I'm just trying to get the Unit and Functional tests of an updated
version of the ExtensionBuilder to work on 7.4, but get weird problems:
1st approach: I added a UnitTests.xml including the
sysext/core/Build/UnitTestsBootstrap.php and extend the
\TYPO3\CMS\Core\Tests\UnitTestCase
First fatal error: class \EBT\ExtensionBuilder\Tests\BaseTest not found
If I include it manually all classes are loaded but the result is
another fatal error: Call to a member function exec_SELECTgetSingleRow()
on null in
/var/www/typo3_src-7.4.git/typo3/sysext/core/Classes/Cache/Backend/Typo3DatabaseBackend.php
on line 169
The backtrace shows, that the ClassInfoCache uses the Typo3DBCache as
backend, although I configured the extbase_object Cache backend to use
the TYPO3\CMS\Core\Cache\Backend\NullBackend (and all other cache types)
???
2nd approach: I use the sysext/core/Build/FunctionalTestsBootstrap.php
and extend the \TYPO3\CMS\Core\Tests\FunctionalTestCase - besides the
same autoloading error as above I now get a notice:
PHP Notice: Use of undefined constant PATH_typo3conf - which was not
the case in 1st approach...??? and all Classes of the ExtensionBuilder
are not found...
I know https://wiki.typo3.org/Unit_Testing_TYPO3 but there is no
description how to execute unit tests in extensions.
The unit tests of the core are running as expected...
--
Nico de Haen
ndh websolutions
Webprogrammierung, OpenSource, Typo3
http://www.ndh-websolutions.de
More information about the TYPO3-dev
mailing list