diff options
author | Bernhard Posselt <dev@bernhard-posselt.com> | 2014-11-06 15:49:16 +0100 |
---|---|---|
committer | Bernhard Posselt <dev@bernhard-posselt.com> | 2014-11-06 15:49:16 +0100 |
commit | a600f6b718ab81efeda1fce68e5f817c3f23504a (patch) | |
tree | dc7521e1a9e9ee767602addef42e56d00861c6c1 /tests/integration/bootstrap.php | |
parent | dcf96e729991764e5dc5d5d9cc384540427dfdc4 (diff) |
try to fix delete older than threshold so we can test it properly
Diffstat (limited to 'tests/integration/bootstrap.php')
-rw-r--r-- | tests/integration/bootstrap.php | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/tests/integration/bootstrap.php b/tests/integration/bootstrap.php index 815913e3a..c8d7cc719 100644 --- a/tests/integration/bootstrap.php +++ b/tests/integration/bootstrap.php @@ -24,7 +24,6 @@ class NewsIntegrationTest extends \PHPUnit_Framework_TestCase { protected function setUp() { $this->ownCloudVersion = \OCP\Util::getVersion(); $this->cleanUp(); - $this->setupUser($this->userId, $this->userPassword); $app = new Application(); $this->container = $app->getContainer(); @@ -67,13 +66,13 @@ class NewsIntegrationTest extends \PHPUnit_Framework_TestCase { // feeds in folders foreach($folders as $folder) { $newFolder = $this->createFolder($folder); - $this->folders[$newFolder->getName()] = $newFolder; + $this->folders[$folder['name']] = $newFolder; if (array_key_exists($folder['name'], $feeds)) { foreach ($feeds[$folder['name']] as $feed) { $feed['folderId'] = $newFolder->getId(); $newFeed = $this->createFeed($feed); - $this->feeds[$newFeed->getTitle()] = $newFeed; + $this->feeds[$feed['title']] = $newFeed; if (array_key_exists($feed['title'], $items)) { foreach ($items[$feed['title']] as $item) { @@ -159,7 +158,7 @@ class NewsIntegrationTest extends \PHPUnit_Framework_TestCase { } - protected function setupUser($user='test', $password='test') { + protected function setupUser($user, $password) { $userManager = \OC::$server->getUserManager(); if ($userManager->userExists($user)) { @@ -176,13 +175,16 @@ class NewsIntegrationTest extends \PHPUnit_Framework_TestCase { $session->login($user, $password); } + private function cleanUp() { + $this->setupUser($this->userId, $this->userPassword); $this->clearNewsDatabase($this->userId); $this->folders = []; $this->feeds = []; $this->items = []; } + protected function tearDown() { $this->cleanUp(); } |