You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Jan 5, 2018. It is now read-only.
Copy file name to clipboardExpand all lines: src/Tests/FileEntityCreationTest.php
-7Lines changed: 0 additions & 7 deletions
Original file line number
Diff line number
Diff line change
@@ -168,18 +168,13 @@ public function testArchiveUpload() {
168
168
169
169
$this->assertText('Extracted archive.tar.gz and added 1 new files.');
170
170
171
-
// Files that match the pattern can be found in the database.
172
171
$this->assertTrue($file = !empty($file_storage->loadByProperties(['filename' => 'test_jpg.jpg'])), "File that matches the pattern can be found in the database.");
173
-
// Files that match the pattern should be permanent.
174
172
$this->assertTrue($file ? $this->getFileByFilename('test_jpg.jpg')->isPermanent() : FALSE, "File that matches the pattern is permanent.");
175
-
// Files that don't match the pattern are not in the database.
176
173
$this->assertFalse(!empty($file_storage->loadByProperties(['filename' => 'test_png.png'])), "File that doesn't match the pattern is not in the database.");
177
174
$this->assertFalse(!empty($file_storage->loadByProperties(['filename' => 'test_text.txt'])), "File that doesn't match the pattern is not in the database.");
178
-
// Archive is removed since we checked the remove_archive checkbox.
179
175
$this->assertFalse(!empty($file_storage->loadByProperties(['filename' => 'archive.tar.gz'])), "Archive is removed since we checked the remove_archive checkbox.");
// Only files that match the pattern are in the public directory.
183
178
$this->assertTrue(array_key_exists('public://archive.tar/' . $jpg_file_path, $all_files), "File that matches the pattern is in the public directory.");
184
179
$this->assertFalse(array_key_exists('public://archive.tar/' . $png_file_path, $all_files), "File that doesn't match the pattern is removed from the public directory.");
185
180
$this->assertFalse(array_key_exists('public://archive.tar/' . $text_file_path, $all_files), "File that doesn't match the pattern is removed from the public directory.");
@@ -196,9 +191,7 @@ public function testArchiveUpload() {
196
191
$this->drupalGet('admin/content/files/archive');
197
192
$this->drupalPostForm(NULL, $edit, t('Submit'));
198
193
199
-
// Archive is in the database since value for remove_checkbox is FALSE.
200
194
$this->assertTrue($file = !empty($file_storage->loadByProperties(['filename' => 'archive2.tar.gz'])), "Archive is in the database since value for remove_checkbox is FALSE.");
201
-
// Check if the archive is set to permanent.
202
195
$this->assertTrue($file ? $this->getFileByFilename('archive2.tar.gz')->isPermanent() : FALSE, "Archive is permanent since value for remove_checkbox is FALSE.");
0 commit comments