Project

General

Profile

Bug #24417 ยป testsPath.diff

Administrator Admin, 2010-12-26 19:59

View differences:

tests/t3lib/tree/t3lib_tree_nodeTest.php (working copy)
* @return string the absolute fixtures path for this testcase, will not be empty
*/
private function determineFixturesPath() {
$possibleFixturesPath1 = PATH_site . 'tests/t3lib/tree/fixtures/';
$possibleFixturesPath2 = PATH_site . 'typo3_src/tests/t3lib/tree/fixtures/';
if (file_exists($possibleFixturesPath1)) {
$fixturesPath = $possibleFixturesPath1;
} elseif (file_exists($possibleFixturesPath2)) {
$fixturesPath = $possibleFixturesPath2;
} else {
$this->fail('The fixtures path could not be determined.');
}
return $fixturesPath;
return t3lib_div::makeInstance('Tx_Phpunit_Service_TestFinder')
->getAbsoluteCoreTestsPath() . 't3lib/tree/fixtures/';
}
protected function setUpNodeTestData() {
tests/t3lib/t3lib_divTest.php (working copy)
$this->markTestSkipped('gifCompressFixesPermissionOfConvertedFileIfUsingImagemagick() test not available without imagemagick setup.');
}
$fixtureGifFile = dirname(__FILE__) . '/fixtures/clear.gif';
$testFinder = t3lib_div::makeInstance('Tx_Phpunit_Service_TestFinder');
$fixtureGifFile = $testFinder->getAbsoluteCoreTestsPath() . 't3lib/fixtures/clear.gif';
$GLOBALS['TYPO3_CONF_VARS']['GFX']['gif_compress'] = TRUE;
......
$this->markTestSkipped('gifCompressFixesPermissionOfConvertedFileIfUsingImagemagick() test not available on Windows.');
}
$fixtureGifFile = dirname(__FILE__) . '/fixtures/clear.gif';
$testFinder = t3lib_div::makeInstance('Tx_Phpunit_Service_TestFinder');
$fixtureGifFile = $testFinder->getAbsoluteCoreTestsPath() . 't3lib/fixtures/clear.gif';
$GLOBALS['TYPO3_CONF_VARS']['GFX']['gdlib'] = TRUE;
$GLOBALS['TYPO3_CONF_VARS']['GFX']['gdlib_png'] = FALSE;
......
$this->markTestSkipped('pngToGifByImagemagickFixesPermissionsOfConvertedFile() test not available without imagemagick setup.');
}
$fixturePngFile = dirname(__FILE__) . '/fixtures/clear.png';
$testFinder = t3lib_div::makeInstance('Tx_Phpunit_Service_TestFinder');
$fixturePngFile = $testFinder->getAbsoluteCoreTestsPath() . 't3lib/fixtures/clear.png';
$GLOBALS['TYPO3_CONF_VARS']['FE']['png_to_gif'] = TRUE;
......
$this->markTestSkipped('readPngGifFixesPermissionsOfConvertedFile() test not available without imagemagick setup.');
}
$testGifFile = dirname(__FILE__) . '/fixtures/clear.gif';
$testFinder = t3lib_div::makeInstance('Tx_Phpunit_Service_TestFinder');
$testGifFile = $testFinder->getAbsoluteCoreTestsPath() . 't3lib/fixtures/clear.gif';
// Set target permissions and run method
$GLOBALS['TYPO3_CONF_VARS']['BE']['fileCreateMask'] = '0777';
......
// Fake all required settings and get an unique logfilename
$GLOBALS['TYPO3_CONF_VARS']['SYS']['encryptionKey'] = uniqid('test_');
$deprecationLogFilename = t3lib_div::getDeprecationLogFileName();
print_r($deprecationLogFilename);
$GLOBALS['TYPO3_CONF_VARS']['SYS']['enableDeprecationLog'] = TRUE;
$GLOBALS['TYPO3_CONF_VARS']['BE']['fileCreateMask'] = '0777';
tests/t3lib/t3lib_extmgmTest.php (working copy)
* @return string the fixtures path for this testcase, will not be empty
*/
private function determineFixturesPath() {
$possibleFixturesPath1 = 'tests/t3lib/fixtures/';
$possibleFixturesPath2 = 'typo3_src/tests/t3lib/fixtures/';
if (file_exists(PATH_site . $possibleFixturesPath1)) {
$fixturesPath = $possibleFixturesPath1;
} elseif (file_exists(PATH_site . $possibleFixturesPath2)) {
$fixturesPath = $possibleFixturesPath2;
} else {
$this->fail('The fixture path could not be determined.');
}
return $fixturesPath;
return t3lib_div::makeInstance('Tx_Phpunit_Service_TestFinder')
->getRelativeCoreTestsPath() . 't3lib/fixtures/';
}
tests/t3lib/t3lib_iconWorksTest.php (working copy)
* @var boolean
*/
protected $backupGlobals = TRUE;
/**
* Exclude TYPO3_DB from backup/restore of $GLOBALS
* because resource types cannot be handled during serializing
......
$this->markTestSkipped('imagemakeFixesPermissionsOnNewFiles() test not available on Windows.');
}
$fixtureGifFile = dirname(__FILE__) . '/fixtures/clear.gif';
$testFinder = t3lib_div::makeInstance('Tx_Phpunit_Service_TestFinder');
$fixtureGifFile = $testFinder->getAbsoluteCoreTestsPath() . 't3lib/fixtures/clear.gif';
// Create image ressource, determine target filename, fake target permission, run method and clean up
$fixtureGifRessource = imagecreatefromgif($fixtureGifFile);
    (1-1/1)