From a0d0edc754ce8bc7f121d296c17a0eb99ce9386b Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Mon, 22 Feb 2016 15:26:59 +0100 Subject: [PATCH] Make non-public-method protected --- .../lib/connector/sabre/filesreportplugin.php | 2 +- .../unit/connector/sabre/filesreportplugin.php | 16 ++++++++-------- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/apps/dav/lib/connector/sabre/filesreportplugin.php b/apps/dav/lib/connector/sabre/filesreportplugin.php index 141b684360..121924ce9a 100644 --- a/apps/dav/lib/connector/sabre/filesreportplugin.php +++ b/apps/dav/lib/connector/sabre/filesreportplugin.php @@ -209,7 +209,7 @@ class FilesReportPlugin extends ServerPlugin { * * @throws TagNotFoundException whenever a tag was not found */ - public function processFilterRules($filterRules) { + protected function processFilterRules($filterRules) { $ns = '{' . $this::NS_OWNCLOUD . '}'; $resultFileIds = null; $systemTagIds = []; diff --git a/apps/dav/tests/unit/connector/sabre/filesreportplugin.php b/apps/dav/tests/unit/connector/sabre/filesreportplugin.php index b528e2d242..83af45d3bc 100644 --- a/apps/dav/tests/unit/connector/sabre/filesreportplugin.php +++ b/apps/dav/tests/unit/connector/sabre/filesreportplugin.php @@ -376,7 +376,7 @@ class FilesReportPlugin extends \Test\TestCase { ['name' => '{http://owncloud.org/ns}systemtag', 'value' => '123'], ]; - $this->assertEquals(['111', '222'], $this->plugin->processFilterRules($rules)); + $this->assertEquals(['111', '222'], $this->invokePrivate($this->plugin, 'processFilterRules', [$rules])); } public function testProcessFilterRulesAndCondition() { @@ -400,7 +400,7 @@ class FilesReportPlugin extends \Test\TestCase { ['name' => '{http://owncloud.org/ns}systemtag', 'value' => '456'], ]; - $this->assertEquals(['222'], array_values($this->plugin->processFilterRules($rules))); + $this->assertEquals(['222'], array_values($this->invokePrivate($this->plugin, 'processFilterRules', [$rules]))); } public function testProcessFilterRulesAndConditionWithOneEmptyResult() { @@ -424,7 +424,7 @@ class FilesReportPlugin extends \Test\TestCase { ['name' => '{http://owncloud.org/ns}systemtag', 'value' => '456'], ]; - $this->assertEquals([], array_values($this->plugin->processFilterRules($rules))); + $this->assertEquals([], array_values($this->invokePrivate($this->plugin, 'processFilterRules', [$rules]))); } public function testProcessFilterRulesAndConditionWithFirstEmptyResult() { @@ -448,7 +448,7 @@ class FilesReportPlugin extends \Test\TestCase { ['name' => '{http://owncloud.org/ns}systemtag', 'value' => '456'], ]; - $this->assertEquals([], array_values($this->plugin->processFilterRules($rules))); + $this->assertEquals([], array_values($this->invokePrivate($this->plugin, 'processFilterRules', [$rules]))); } public function testProcessFilterRulesAndConditionWithEmptyMidResult() { @@ -475,7 +475,7 @@ class FilesReportPlugin extends \Test\TestCase { ['name' => '{http://owncloud.org/ns}systemtag', 'value' => '789'], ]; - $this->assertEquals([], array_values($this->plugin->processFilterRules($rules))); + $this->assertEquals([], array_values($this->invokePrivate($this->plugin, 'processFilterRules', [$rules]))); } public function testProcessFilterRulesInvisibleTagAsAdmin() { @@ -517,7 +517,7 @@ class FilesReportPlugin extends \Test\TestCase { ['name' => '{http://owncloud.org/ns}systemtag', 'value' => '456'], ]; - $this->assertEquals(['222'], array_values($this->plugin->processFilterRules($rules))); + $this->assertEquals(['222'], array_values($this->invokePrivate($this->plugin, 'processFilterRules', [$rules]))); } /** @@ -554,7 +554,7 @@ class FilesReportPlugin extends \Test\TestCase { ['name' => '{http://owncloud.org/ns}systemtag', 'value' => '456'], ]; - $this->plugin->processFilterRules($rules); + $this->invokePrivate($this->plugin, 'processFilterRules', [$rules]); } public function testProcessFilterRulesVisibleTagAsUser() { @@ -597,6 +597,6 @@ class FilesReportPlugin extends \Test\TestCase { ['name' => '{http://owncloud.org/ns}systemtag', 'value' => '456'], ]; - $this->assertEquals(['222'], array_values($this->plugin->processFilterRules($rules))); + $this->assertEquals(['222'], array_values($this->invokePrivate($this->plugin, 'processFilterRules', [$rules]))); } }