[TYPO3-core] RFC #16777: Bug: Test failure in t3lib_extmgmTest if tests are located in typo3_src/tests/ instead of tests/
Oliver Klee
typo3-german-02 at oliverklee.de
Sat Dec 18 16:49:12 CET 2010
This is an SVN patch request.
Type: Bugfix
Bugtracker references:
http://bugs.typo3.org/view.php?id=16777
Branches:
trunk, TYPO3_4-4
Problem:
Testsuite: t3lib_extmgmTest
getExtensionVersionForLoadedExtensionReturnsExtensionVersion
! Failure in test case
getExtensionVersionForLoadedExtensionReturnsExtensionVersion
File: /home/klee/eclipse/typo3_src/tests/t3lib/t3lib_extmgmTest.php
Line: 463:
Description
Failed asserting that <null> is equal to <string:1.2.3>.
This happens because the fixtures directory is incorrect when the tests
are located in PATH_site . typo3_src/tests/ instead of in PATH_site .
tests/ :
public function
getExtensionVersionForLoadedExtensionReturnsExtensionVersion() {
t3lib_extMgm::clearExtensionKeyMap();
$uniqueSuffix = uniqid('test');
$extensionKey = 'unloadedextension' . $uniqueSuffix;
$GLOBALS['TYPO3_LOADED_EXT'][$extensionKey] = array(
'siteRelPath' => 'tests/t3lib/fixtures/',
);
$this->assertEquals(
'1.2.3',
t3lib_extMgm::getExtensionVersion($extensionKey)
);
}
Solution:
The tests need to take both path variants into account.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: extMgmTest.diff
Type: text/x-diff
Size: 1275 bytes
Desc: not available
URL: <http://lists.typo3.org/pipermail/typo3-team-core/attachments/20101218/652cee6b/attachment.diff>
More information about the TYPO3-team-core
mailing list