summaryrefslogtreecommitdiffstats
path: root/core/l10n/ro.json
Commit message (Expand)AuthorAgeFilesLines
* [tx-robot] updated from transifexNextcloud bot2017-11-091-11/+11
* [tx-robot] updated from transifexNextcloud bot2017-11-031-1/+1
* [tx-robot] updated from transifexNextcloud bot2017-10-191-1/+1
* [tx-robot] updated from transifexNextcloud bot2017-10-051-1/+1
* [tx-robot] updated from transifexNextcloud bot2017-09-221-2/+6
* [tx-robot] updated from transifexNextcloud bot2017-09-191-1/+1
* [tx-robot] updated from transifexNextcloud bot2017-09-171-2/+51
* [tx-robot] updated from transifexNextcloud bot2017-08-301-5/+5
* [tx-robot] updated from transifexNextcloud bot2017-08-011-1/+8
* [tx-robot] updated from transifexNextcloud bot2017-06-151-5/+5
* [tx-robot] updated from transifexNextcloud bot2017-06-141-2/+1
* [tx-robot] updated from transifexNextcloud bot2017-06-131-2/+2
* [tx-robot] updated from transifexNextcloud bot2017-05-201-1/+1
* [tx-robot] updated from transifexNextcloud bot2017-05-121-2/+2
* [tx-robot] updated from transifexNextcloud bot2017-05-051-1/+1
* [tx-robot] updated from transifexNextcloud bot2017-05-021-9/+9
* [tx-robot] updated from transifexNextcloud bot2017-04-251-9/+9
* [tx-robot] updated from transifexNextcloud bot2017-04-181-2/+2
* [tx-robot] updated from transifexNextcloud bot2017-04-141-1/+1
* [tx-robot] updated from transifexNextcloud bot2017-04-131-5/+5
* [tx-robot] updated from transifexNextcloud bot2017-04-081-6/+6
* [tx-robot] updated from transifexNextcloud bot2017-04-061-1/+1
* [tx-robot] updated from transifexNextcloud bot2017-03-281-1/+1
* [tx-robot] updated from transifexNextcloud bot2017-03-271-82/+2
* [tx-robot] updated from transifexNextcloud bot2017-03-171-1/+1
* [tx-robot] updated from transifexNextcloud bot2017-03-161-1/+0
* [tx-robot] updated from transifexNextcloud bot2017-03-041-0/+374
* [tx-robot] updated from transifexNextcloud bot2016-11-301-265/+0
* [tx-robot] updated from transifexNextcloud bot2016-10-041-1/+1
* [tx-robot] updated from transifexNextcloud bot2016-09-011-15/+15
* [tx-robot] updated from transifexNextcloud bot2016-08-091-3/+0
* [tx-robot] updated from transifexNextcloud bot2016-07-061-3/+0
* [tx-robot] updated from transifexJenkins for ownCloud2016-06-261-1/+15
* [tx-robot] updated from transifexJenkins for ownCloud2016-06-101-1/+55
* [tx-robot] updated from transifexJenkins for ownCloud2016-05-211-0/+1
* [tx-robot] updated from transifexJenkins for ownCloud2016-05-111-0/+1
* [tx-robot] updated from transifexJenkins for ownCloud2016-05-071-4/+55
* [tx-robot] updated from transifexJenkins for ownCloud2016-05-041-2/+2
* [tx-robot] updated from transifexJenkins for ownCloud2016-04-211-2/+2
* [tx-robot] updated from transifexJenkins for ownCloud2016-04-091-0/+1
* [tx-robot] updated from transifexJenkins for ownCloud2016-04-071-7/+7
* [tx-robot] updated from transifexJenkins for ownCloud2016-04-061-1/+0
* [tx-robot] updated from transifexJenkins for ownCloud2016-03-241-1/+0
* [tx-robot] updated from transifexJenkins for ownCloud2016-02-161-1/+0
* [tx-robot] updated from transifexJenkins for ownCloud2016-02-141-0/+1
* [tx-robot] updated from transifexJenkins for ownCloud2016-01-291-2/+0
* [tx-robot] updated from transifexJenkins for ownCloud2016-01-231-0/+1
* [tx-robot] updated from transifexJenkins for ownCloud2016-01-221-7/+7
* [tx-robot] updated from transifexJenkins for ownCloud2015-10-241-1/+0
* [tx-robot] updated from transifexJenkins for ownCloud2015-10-221-1/+0
pan>: void { $query = $this->dbConnection->getQueryBuilder(); $query->delete('properties'); $query->execute(); parent::tearDown(); } private function formatPath(string $path): string { if (strlen($path) > 250) { return sha1($path); } else { return $path; } } protected function insertProps(string $user, string $path, array $props) { foreach ($props as $name => $value) { $this->insertProp($user, $path, $name, $value); } } protected function insertProp(string $user, string $path, string $name, string $value) { $query = $this->dbConnection->getQueryBuilder(); $query->insert('properties') ->values([ 'userid' => $query->createNamedParameter($user), 'propertypath' => $query->createNamedParameter($this->formatPath($path)), 'propertyname' => $query->createNamedParameter($name), 'propertyvalue' => $query->createNamedParameter($value), ]); $query->execute(); } protected function getProps(string $user, string $path) { $query = $this->dbConnection->getQueryBuilder(); $query->select('propertyname', 'propertyvalue') ->from('properties') ->where($query->expr()->eq('userid', $query->createNamedParameter($user))) ->where($query->expr()->eq('propertypath', $query->createNamedParameter($this->formatPath($path)))); return $query->execute()->fetchAll(\PDO::FETCH_KEY_PAIR); } public function testPropFindNoDbCalls() { $db = $this->createMock(IDBConnection::class); $backend = new CustomPropertiesBackend( $this->tree, $db, $this->user ); $propFind = $this->createMock(PropFind::class); $propFind->expects($this->at(0)) ->method('get404Properties') ->with() ->willReturn([ '{http://owncloud.org/ns}permissions', '{http://owncloud.org/ns}downloadURL', '{http://owncloud.org/ns}dDC', '{http://owncloud.org/ns}size', ]); $db->expects($this->never()) ->method($this->anything()); $backend->propFind('foo_bar_path_1337_0', $propFind); } public function testPropFindCalendarCall() { $propFind = $this->createMock(PropFind::class); $propFind->method('get404Properties') ->with() ->willReturn([ '{DAV:}getcontentlength', '{DAV:}getcontenttype', '{DAV:}getetag', '{abc}def', ]); $propFind->method('getRequestedProperties') ->with() ->willReturn([ '{DAV:}getcontentlength', '{DAV:}getcontenttype', '{DAV:}getetag', '{DAV:}displayname', '{urn:ietf:params:xml:ns:caldav}calendar-description', '{urn:ietf:params:xml:ns:caldav}calendar-timezone', '{abc}def', ]); $props = [ '{abc}def' => 'a', '{DAV:}displayname' => 'b', '{urn:ietf:params:xml:ns:caldav}calendar-description' => 'c', '{urn:ietf:params:xml:ns:caldav}calendar-timezone' => 'd', ]; $this->insertProps('dummy_user_42', 'calendars/foo/bar_path_1337_0', $props); $setProps = []; $propFind->method('set') ->willReturnCallback(function ($name, $value, $status) use (&$setProps) { $setProps[$name] = $value; }); $this->backend->propFind('calendars/foo/bar_path_1337_0', $propFind); $this->assertEquals($props, $setProps); } /** * @dataProvider propPatchProvider */ public function testPropPatch(string $path, array $existing, array $props, array $result) { $this->insertProps($this->user->getUID(), $path, $existing); $propPatch = new PropPatch($props); $this->backend->propPatch($path, $propPatch); $propPatch->commit(); $storedProps = $this->getProps($this->user->getUID(), $path); $this->assertEquals($result, $storedProps); } public function propPatchProvider() { $longPath = str_repeat('long_path', 100); return [ ['foo_bar_path_1337', [], ['{DAV:}displayname' => 'anything'], ['{DAV:}displayname' => 'anything']], ['foo_bar_path_1337', ['{DAV:}displayname' => 'foo'], ['{DAV:}displayname' => 'anything'], ['{DAV:}displayname' => 'anything']], ['foo_bar_path_1337', ['{DAV:}displayname' => 'foo'], ['{DAV:}displayname' => null], []], [$longPath, [], ['{DAV:}displayname' => 'anything'], ['{DAV:}displayname' => 'anything']], ]; } /** * @dataProvider deleteProvider */ public function testDelete(string $path) { $this->insertProps('dummy_user_42', $path, ['foo' => 'bar']); $this->backend->delete($path); $this->assertEquals([], $this->getProps('dummy_user_42', $path)); } public function deleteProvider() { return [ ['foo_bar_path_1337'], [str_repeat('long_path', 100)] ]; } /** * @dataProvider moveProvider */ public function testMove(string $source, string $target) { $this->insertProps('dummy_user_42', $source, ['foo' => 'bar']); $this->backend->move($source, $target); $this->assertEquals([], $this->getProps('dummy_user_42', $source)); $this->assertEquals(['foo' => 'bar'], $this->getProps('dummy_user_42', $target)); } public function moveProvider() { return [ ['foo_bar_path_1337', 'foo_bar_path_7333'], [str_repeat('long_path1', 100), str_repeat('long_path2', 100)] ]; } }