diff options
author | John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com> | 2018-12-05 19:41:19 +0100 |
---|---|---|
committer | Backportbot <backportbot-noreply@rullzer.com> | 2018-12-05 21:54:50 +0000 |
commit | 70283626045ef16aef66493078009c28222825c8 (patch) | |
tree | 8310913141a4077396189d8f1baec4b5aa1fd598 /tests/lib | |
parent | fc6dd2d4cb49282cd00df48128c436ac8e9f416e (diff) | |
download | nextcloud-server-70283626045ef16aef66493078009c28222825c8.tar.gz nextcloud-server-70283626045ef16aef66493078009c28222825c8.zip |
Log and continue on Dav reader failure
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
Diffstat (limited to 'tests/lib')
-rw-r--r-- | tests/lib/Repair/SetVcardDatabaseUIDTest.php | 11 |
1 files changed, 9 insertions, 2 deletions
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); } |