diff options
author | Bernhard Posselt <nukeawhale@gmail.com> | 2013-09-13 18:29:34 +0200 |
---|---|---|
committer | Bernhard Posselt <nukeawhale@gmail.com> | 2013-09-13 18:29:34 +0200 |
commit | 6b138b98a6a92d31263dfcf8075e432f0df40649 (patch) | |
tree | 8f647ec1491de674f3093f24fad21521d25eec01 /tests/unit/utility | |
parent | e178dc843a677fe2512ebd2247e20016eb18cd5b (diff) |
use before and after update hooks to delete items only after new ones have been fetched
Diffstat (limited to 'tests/unit/utility')
-rw-r--r-- | tests/unit/utility/UpdaterTest.php | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/tests/unit/utility/UpdaterTest.php b/tests/unit/utility/UpdaterTest.php index 8a900d15e..2e6b03351 100644 --- a/tests/unit/utility/UpdaterTest.php +++ b/tests/unit/utility/UpdaterTest.php @@ -58,17 +58,21 @@ class UpdaterTest extends \PHPUnit_Framework_TestCase { $this->itemBusinessLayer); } - public function testCleanUp() { + public function testBeforeUpdate() { $this->folderBusinessLayer->expects($this->once()) ->method('purgeDeleted'); $this->feedBusinessLayer->expects($this->once()) ->method('purgeDeleted'); + $this->updater->beforeUpdate(); + } + + + public function testAfterUpdate() { $this->itemBusinessLayer->expects($this->once()) ->method('autoPurgeOld'); - $this->updater->cleanUp(); + $this->updater->afterUpdate(); } - public function testUpdate() { $this->feedBusinessLayer->expects($this->once()) ->method('updateAll'); |