From 2be63bcb6a772dbb5600e116595751fed6ac261e Mon Sep 17 00:00:00 2001 From: "John Molakvoæ (skjnldsv)" Date: Wed, 5 Dec 2018 19:41:19 +0100 Subject: Log and continue on Dav reader failure MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: John Molakvoæ (skjnldsv) --- tests/lib/Repair/SetVcardDatabaseUIDTest.php | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'tests/lib/Repair') diff --git a/tests/lib/Repair/SetVcardDatabaseUIDTest.php b/tests/lib/Repair/SetVcardDatabaseUIDTest.php index 97da3c6a901..2939528a21a 100644 --- a/tests/lib/Repair/SetVcardDatabaseUIDTest.php +++ b/tests/lib/Repair/SetVcardDatabaseUIDTest.php @@ -24,6 +24,8 @@ namespace Test\Repair; use OCP\IConfig; +use OCP\ILogger; +use OCP\Migration\IOutput; use OC\Repair\NC15\SetVcardDatabaseUID; use Test\TestCase; @@ -38,11 +40,15 @@ class SetVcardDatabaseUIDTest extends TestCase { /** @var IConfig */ private $config; + /** @var Ilogger */ + private $logger; + protected function setUp() { parent::setUp(); $this->config = $this->createMock(IConfig::class); - $this->repair = new SetVcardDatabaseUID(\OC::$server->getDatabaseConnection(), $this->config); + $this->logger = $this->createMock(Ilogger::class); + $this->repair = new SetVcardDatabaseUID(\OC::$server->getDatabaseConnection(), $this->config, $this->logger); } protected function tearDown() { @@ -86,7 +92,8 @@ class SetVcardDatabaseUIDTest extends TestCase { * @param string|boolean $expected */ public function testExtractUIDFromVcard($from, $expected) { - $uid = $this->invokePrivate($this->repair, 'getUid', ['carddata' => $from]); + $output = $this->createMock(IOutput::class); + $uid = $this->invokePrivate($this->repair, 'getUid', ['carddata' => $from, 'output' => $output]); $this->assertEquals($expected, $uid); } -- cgit v1.2.3