summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorMorris Jobke <hey@morrisjobke.de>2018-12-05 22:54:10 +0100
committerGitHub <noreply@github.com>2018-12-05 22:54:10 +0100
commite808661ca27c61bc298dd3c6cf42322839e9a0b6 (patch)
tree43a9f464f7bef0fb20c78ba0ddd94c7153107b63 /tests
parent45294cbea3af811cf37d23064a5e540a41b11779 (diff)
parent2be63bcb6a772dbb5600e116595751fed6ac261e (diff)
downloadnextcloud-server-e808661ca27c61bc298dd3c6cf42322839e9a0b6.tar.gz
nextcloud-server-e808661ca27c61bc298dd3c6cf42322839e9a0b6.zip
Merge pull request #12854 from nextcloud/vcard-repair-uid-fix
Log and continue on Dav reader failure (repair uid)
Diffstat (limited to 'tests')
-rw-r--r--tests/lib/Repair/SetVcardDatabaseUIDTest.php11
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);
}