From b88452c5a2e4ee52725850959c1cfcb7feeb935b Mon Sep 17 00:00:00 2001 From: fred Date: Mon, 10 Jul 2017 18:27:52 +0200 Subject: [PATCH] Fixed: the "Skip Import" link was hidden after unit tests --- lib/Util/ProgressBar.php | 10 +++++++++- tests/unit/Config/MP2MigratorTest.php | 1 + 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/lib/Util/ProgressBar.php b/lib/Util/ProgressBar.php index cd7b2bbfbe..bdaf0d8603 100644 --- a/lib/Util/ProgressBar.php +++ b/lib/Util/ProgressBar.php @@ -65,7 +65,7 @@ if(!class_exists('ProgressBar', false)) { * @param int $count Count */ public function setTotalCount($count) { - if($count != $this->total_count) { + if(($count != $this->total_count) || ($count == 0)) { $this->total_count = $count; $this->current_count = 0; $this->saveProgress(); @@ -93,6 +93,14 @@ if(!class_exists('ProgressBar', false)) { ))); } + /** + * Delete the progress file + * + */ + public function deleteProgressFile() { + unlink($this->filename); + } + } } diff --git a/tests/unit/Config/MP2MigratorTest.php b/tests/unit/Config/MP2MigratorTest.php index dcee290b5e..577527204f 100644 --- a/tests/unit/Config/MP2MigratorTest.php +++ b/tests/unit/Config/MP2MigratorTest.php @@ -16,6 +16,7 @@ class MP2MigratorTest extends MailPoetTest { } public function _after() { + $this->MP2Migrator->progressbar->setTotalCount(0); } /**