Skip to content
This repository has been archived by the owner on Dec 27, 2023. It is now read-only.

Commit

Permalink
fix(Filemanager tests) remove catch that acts like a markedSkipped
Browse files Browse the repository at this point in the history
  • Loading branch information
paulmhh committed Nov 24, 2021
1 parent 9b832d6 commit 06135fc
Showing 1 changed file with 6 additions and 14 deletions.
20 changes: 6 additions & 14 deletions tests/tine20/Filemanager/ControllerTests.php
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,6 @@ public function testDeletePersonalContainer()
*/
public function testNotificationUpdateForReadOnly()
{
Tinebase_Core::setLocale('en');

$oldUser = Tinebase_Core::getUser();
/** @var Tinebase_Model_FullUser $sclever */
$sclever = $this->_personas['sclever'];
Expand Down Expand Up @@ -108,8 +106,8 @@ public function testNotificationUpdateForReadOnly()
$node = $fileManager->get($node->getId());
$node->grants = $fileSystem->getGrantsOfContainer($node);
$node->grants->addRecord(new Tinebase_Model_Grants(array(
'account_type' => Tinebase_Acl_Rights::ACCOUNT_TYPE_USER,
'account_id' => $sclever->getId(),
'account_type' => Tinebase_Acl_Rights::ACCOUNT_TYPE_USER,
'account_id' => $sclever->getId(),
Tinebase_Model_Grants::GRANT_READ => true,
)));
$node = $fileManager->update($node);
Expand All @@ -121,11 +119,11 @@ public function testNotificationUpdateForReadOnly()
Tinebase_Model_Tree_Node::XPROPS_NOTIFICATION_ACCOUNT_ID => $sclever->getId(),
Tinebase_Model_Tree_Node::XPROPS_NOTIFICATION_ACCOUNT_TYPE => Tinebase_Acl_Rights::ACCOUNT_TYPE_USER,
Tinebase_Model_Tree_Node::XPROPS_NOTIFICATION_ACTIVE => true,
),array(
), array(
Tinebase_Model_Tree_Node::XPROPS_NOTIFICATION_ACCOUNT_ID => '1233',
Tinebase_Model_Tree_Node::XPROPS_NOTIFICATION_ACCOUNT_TYPE => Tinebase_Acl_Rights::ACCOUNT_TYPE_USER,
Tinebase_Model_Tree_Node::XPROPS_NOTIFICATION_ACTIVE => true,
),array(
), array(
Tinebase_Model_Tree_Node::XPROPS_NOTIFICATION_ACCOUNT_ID => $sclever->getId(),
Tinebase_Model_Tree_Node::XPROPS_NOTIFICATION_ACCOUNT_TYPE => Tinebase_Acl_Rights::ACCOUNT_TYPE_GROUP,
Tinebase_Model_Tree_Node::XPROPS_NOTIFICATION_ACTIVE => true,
Expand All @@ -146,8 +144,6 @@ public function testNotificationUpdateForReadOnly()
$node->{Tinebase_Model_Tree_Node::XPROPS_NOTIFICATION} = array();
$node = $fileManager->update($node);
static::assertEquals(0, count($node->xprops(Tinebase_Model_Tree_Node::XPROPS_NOTIFICATION)));
} catch (Tinebase_Exception_NotFound $tenf) {
// FIXME some test running before this might have removed the $personalFolderPath . '/' . $personalFolderName folder
} finally {
Tinebase_Core::set(Tinebase_Core::USER, $oldUser);
}
Expand All @@ -164,12 +160,8 @@ public function testRenameFolderCaseSensitive()
$personalFolderPath .= sprintf($translation->_("/%s's personal files"), Tinebase_Core::getUser()->accountFullName);
$fileManager = Filemanager_Controller_Node::getInstance();

try {
$fileManager->createNodes($personalFolderPath . '/test', Tinebase_Model_Tree_FileObject::TYPE_FOLDER);
$fileManager->moveNodes(array($personalFolderPath . '/test'), array($personalFolderPath . '/Test'));
} catch (Tinebase_Exception_NotFound $tenf) {
// FIXME some test running before this might have removed the $personalFolderPath folder
}
$fileManager->createNodes($personalFolderPath . '/test', Tinebase_Model_Tree_FileObject::TYPE_FOLDER);
$fileManager->moveNodes(array($personalFolderPath . '/test'), array($personalFolderPath . '/Test'));
}

public function testCreateSharedTopLevelFolder()
Expand Down

0 comments on commit 06135fc

Please sign in to comment.