Skip to content
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Restore old configuration value after test
Signed-off-by: Carl Csaposs <[email protected]>
  • Loading branch information
Carl Csaposs committed Jun 15, 2022
commit 1a6aed68dc9c93e7bd42c2b53d81a1df369c5e06
3 changes: 2 additions & 1 deletion tests/lib/Preview/BackgroundCleanupJobTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -202,6 +202,7 @@ public function testPreviewsDisabled() {
$root = $this->getRoot();
$this->assertSame(11, $this->countPreviews($root, $fileIds));

$oldConfig = $this->config->getSystemValueBool('enable_previews', true);
$this->config->setSystemValue('enable_previews', false);

$job = new BackgroundCleanupJob($this->config, $this->connection, $root, $this->mimeTypeLoader, true);
Expand All @@ -211,7 +212,7 @@ public function testPreviewsDisabled() {
$this->assertSame(11, $this->countPreviews($root, $fileIds));

// Cleanup
$this->config->setSystemValue('enable_previews', true);
$this->config->setSystemValue('enable_previews', $oldConfig);
}

public function testOldPreviews() {
Expand Down