Issue Bug Closed

#24363Test failure in t3lib_extmgmTest if tests are in typo3_src/tests/ instead of tests/

Oliver Klee 12/18/10, 16:45 updated 10/02/18, 12:21

Description

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>.</string:1></null>

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)
);
}

So the tests case needs to work with both path variants.
(issue imported from #M16777)

Reviews 0

No change resolves or names this issue in its commit message, and no comment links one.