Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
namespace OC\Repair;
-use OCP\DB\Exception;
+use Doctrine\DBAL\DBALException;
use OCP\IConfig;
use OCP\IDBConnection;
use OCP\IGroupManager;
->setParameter('shareId', $share['id'])
->execute();
$this->logger->info('Repaired principal for dav share {id} from {old} to {new}', $logParameters);
- } catch (Exception $e) {
+ } catch (DBALException $e) {
$logParameters['message'] = $e->getMessage();
$logParameters['exception'] = $e;
$this->logger->info('Could not repair principal for dav share {id} from {old} to {new}: {message}', $logParameters);
namespace Test\Repair;
+use Doctrine\DBAL\Driver\Statement;
use OC\Repair\RepairDavShares;
-use OCP\DB\IResult;
use OCP\DB\QueryBuilder\IExpressionBuilder;
use OCP\DB\QueryBuilder\IQueryBuilder;
use OCP\IConfig;
],
];
- $shareResults = $this->createMock(IResult::class);
+ $shareResults = $this->createMock(Statement::class);
$shareResults->expects($this->any())
->method('fetch')
->willReturnCallback(function () use (&$shareResultData) {