Project

General

Profile

Bug #24419 » 16849.diff

Administrator Admin, 2010-12-26 22:59

View differences:

tests/t3lib/t3lib_divTest.php (Arbeitskopie)
* @test
*/
public function fixPermissionsCorrectlySetsPermissionsToFile() {
if (TYPO3_OS == 'WIN') {
$this->markTestSkipped('fixPermissions() tests not available on Windows');
}
$this->fixPermissionsCheckEnvironment();
// Create and prepare test file
$filename = PATH_site . 'typo3temp/' . uniqid('test_');
......
* @test
*/
public function fixPermissionsCorrectlySetsPermissionsToHiddenFile() {
if (TYPO3_OS == 'WIN') {
$this->markTestSkipped('fixPermissions() tests not available on Windows');
}
$this->fixPermissionsCheckEnvironment();
// Create and prepare test file
$filename = PATH_site . 'typo3temp/' . uniqid('.test_');
......
* @test
*/
public function fixPermissionsCorrectlySetsPermissionsToDirectory() {
if (TYPO3_OS == 'WIN') {
$this->markTestSkipped('fixPermissions() tests not available on Windows');
}
$this->fixPermissionsCheckEnvironment();
// Create and prepare test directory
$directory = PATH_site . 'typo3temp/' . uniqid('test_');
......
* @test
*/
public function fixPermissionsCorrectlySetsPermissionsToHiddenDirectory() {
if (TYPO3_OS == 'WIN') {
$this->markTestSkipped('fixPermissions() tests not available on Windows');
}
$this->fixPermissionsCheckEnvironment();
// Create and prepare test directory
$directory = PATH_site . 'typo3temp/' . uniqid('.test_');
......
* @test
*/
public function fixPermissionsCorrectlySetsPermissionsRecursive() {
if (TYPO3_OS == 'WIN') {
$this->markTestSkipped('fixPermissions() tests not available on Windows');
}
$this->fixPermissionsCheckEnvironment();
// Create and prepare test directory and file structure
$baseDirectory = PATH_site . 'typo3temp/' . uniqid('test_');
......
* @test
*/
public function fixPermissionsDoesNotSetPermissionsToNotAllowedPath() {
if (TYPO3_OS == 'WIN') {
$this->markTestSkipped('fixPermissions() tests not available on Windows');
}
$this->fixPermissionsCheckEnvironment();
// Create and prepare test file
$filename = PATH_site . 'typo3temp/../typo3temp/' . uniqid('test_');
......
$this->assertEquals($resultFilePermissions, '0742');
}
/**
* Checks the environment and skips fixPermissions() tests, if not applicable
*
* @return void
*/
private function fixPermissionsCheckEnvironment() {
if (TYPO3_OS == 'WIN') {
$this->markTestSkipped('fixPermissions() tests not available on Windows');
}
if (!function_exists('posix_getegid')) {
$this->markTestSkipped('Function posix_getegid() not available, fixPermissions() tests skipped');
}
}
///////////////////////////////
// Tests concerning mkdir
(2-2/2)