Same name in other branches
- 8.x-1.x tests/exif_orientation.test \ExifOrientationTest::setUp()
Fichier
-
tests/
exif_orientation.test, line 19
Classe
- ExifOrientationTest
- @file Tests for exif_orientation.module.
Code
public function setUp() {
$modules = array(
'image',
'exif_orientation',
);
parent::setUp($modules);
// Set to high quality because we don't want encoding artifacts.
variable_set('image_jpeg_quality', 98);
// Code from UserPictureTestCase:
// Enable user pictures.
variable_set('user_pictures', 1);
// Test if directories specified in settings exist in filesystem.
$file_dir = 'public://';
$file_check = file_prepare_directory($file_dir, FILE_CREATE_DIRECTORY);
$picture_dir = variable_get('user_picture_path', 'pictures');
$picture_path = $file_dir . $picture_dir;
$pic_check = file_prepare_directory($picture_path, FILE_CREATE_DIRECTORY);
$this->_directory_test = is_writable($picture_path);
$this->assertTrue($this->_directory_test, "The directory {$picture_path} doesn't exist or is not writable. Further tests won't be made.");
}