Commit b5fcb5b7 authored by Christian Kuhn's avatar Christian Kuhn
Browse files

[TASK] Move fixture files from tests/

There are still some fixture files within the root tests/ directory.
The patch moves them to Fixtures/ folders below the using tests
within the affected core and backend extensions.

Change-Id: Ied23b542a65becac02c9af576728da886552484d
Resolves: #40834
Related: #40095
Releases: 6.0
Reviewed-on: http://review.typo3.org/14525
Reviewed-by: Christian Kuhn
Tested-by: Christian Kuhn
parent a0cf6ea5
......@@ -98,8 +98,7 @@ class IconUtilityTest extends \tx_phpunit_testcase {
if (TYPO3_OS == 'WIN') {
$this->markTestSkipped('imagemakeFixesPermissionsOnNewFiles() test not available on Windows.');
}
$testFinder = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('Tx_Phpunit_Service_TestFinder');
$fixtureGifFile = $testFinder->getAbsoluteCoreTestsPath() . 'Unit/t3lib/fixtures/clear.gif';
$fixtureGifFile = __DIR__ . '/Fixtures/clear.gif';
// Create image ressource, determine target filename, fake target permission, run method and clean up
$fixtureGifRessource = imagecreatefromgif($fixtureGifFile);
$targetFilename = ((PATH_site . 'typo3temp/') . uniqid('test_')) . '.gif';
......
......@@ -212,15 +212,6 @@ class ExtensionManagerTest extends \tx_phpunit_testcase {
return $tca;
}
/**
* Returns the fixtures path for this testcase relative to PATH_site.
*
* @return string the fixtures path for this testcase, will not be empty
*/
private function determineFixturesPath() {
return \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('Tx_Phpunit_Service_TestFinder')->getRelativeCoreTestsPath() . 'Unit/t3lib/fixtures/';
}
/////////////////////////////////////////////
// Tests concerning getExtensionKeyByPrefix
/////////////////////////////////////////////
......@@ -922,13 +913,20 @@ throw new RuntimeException(\'\', 1340559079);
public function getExtensionVersionForLoadedExtensionReturnsExtensionVersion() {
$namespace = 'TYPO3\\CMS\\Core\\Extension';
$className = uniqid('ExtensionManager');
eval(((((('namespace ' . $namespace .'; class ' . $className) . ' extends \\TYPO3\\CMS\\Core\\Extension\\ExtensionManager {') . ' public static function isLoaded() {') . ' return TRUE;') . ' }') . '}');
eval(
'namespace ' . $namespace .';' .
'class ' . $className . ' extends \\TYPO3\\CMS\\Core\\Extension\\ExtensionManager {' .
' public static function isLoaded() {' .
' return TRUE;' .
' }' .
'}'
);
$className = $namespace . '\\' . $className;
\TYPO3\CMS\Core\Extension\ExtensionManager::clearExtensionKeyMap();
$uniqueSuffix = uniqid('test');
$extensionKey = 'unloadedextension' . $uniqueSuffix;
$GLOBALS['TYPO3_LOADED_EXT'][$extensionKey] = array(
'siteRelPath' => $this->determineFixturesPath()
'siteRelPath' => 'typo3/sysext/core/Tests/Unit/Extension/Fixtures/',
);
$this->assertEquals('1.2.3', $className::getExtensionVersion($extensionKey));
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment