From 63c2065ad139b33322a785dcd4a32a4d3a0b1af2 Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Mon, 8 May 2017 11:23:39 +0200 Subject: [PATCH 1/3] Adjust the category Signed-off-by: Joas Schilling --- appinfo/info.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/appinfo/info.xml b/appinfo/info.xml index d8ab6783..a1db65b8 100644 --- a/appinfo/info.xml +++ b/appinfo/info.xml @@ -9,7 +9,7 @@ 1.2.2 FilesAccessControl - other + files https://github.com/nextcloud/files_accesscontrol https://github.com/nextcloud/files_accesscontrol/issues https://github.com/nextcloud/files_accesscontrol.git From 8b8175e3d0047861ad0e19aa0dea882d22dbcc69 Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Mon, 8 May 2017 11:24:51 +0200 Subject: [PATCH 2/3] Increase version Signed-off-by: Joas Schilling --- Makefile | 2 +- appinfo/info.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 20b9e943..b0ee6bee 100644 --- a/Makefile +++ b/Makefile @@ -7,7 +7,7 @@ source_dir=$(build_dir)/source sign_dir=$(build_dir)/sign package_name=$(app_name) cert_dir=$(HOME)/.nextcloud/certificates -version+=1.2.2 +version+=1.2.3 all: appstore diff --git a/appinfo/info.xml b/appinfo/info.xml index a1db65b8..1b3886aa 100644 --- a/appinfo/info.xml +++ b/appinfo/info.xml @@ -6,7 +6,7 @@ Nextcloud's File Access Control app enables administrators to create and manage a set of rule groups. Each of the rule groups consists of one or more rules. If all rules of a group hold true, the group matches the request and access is being denied. The rules criteria range from IP address, to user groups, collaborative tags and some more. AGPL Morris Jobke - 1.2.2 + 1.2.3 FilesAccessControl files From 106f8eb3ad5f22e21fc7232af22a61711b646376 Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Mon, 8 May 2017 11:32:08 +0200 Subject: [PATCH 3/3] Fix unit tests Signed-off-by: Joas Schilling --- tests/Settings/AdminTest.php | 38 +++++++++++++++--------------------- 1 file changed, 16 insertions(+), 22 deletions(-) diff --git a/tests/Settings/AdminTest.php b/tests/Settings/AdminTest.php index 45874dc7..2426a0bd 100644 --- a/tests/Settings/AdminTest.php +++ b/tests/Settings/AdminTest.php @@ -30,49 +30,43 @@ use OCP\IL10N; use Symfony\Component\EventDispatcher\EventDispatcherInterface; use Test\TestCase; +use OCP\AppFramework\Http\TemplateResponse; class AdminTest extends TestCase { - /** @var IL10N */ + /** @var IL10N|\PHPUnit_Framework_MockObject_MockObject */ protected $l; - /** @var Application */ + /** @var Application|\PHPUnit_Framework_MockObject_MockObject */ protected $app; - /** @var EventDispatcherInterface */ + /** @var EventDispatcherInterface|\PHPUnit_Framework_MockObject_MockObject */ protected $dispatcher; - /** @var Admin */ + /** @var Admin */ protected $admin; - /** @var IAppContainer */ + /** @var IAppContainer|\PHPUnit_Framework_MockObject_MockObject */ protected $container; protected function setUp() { parent::setUp(); - $this->l = $this->getMockBuilder('OCP\IL10N') - ->getMock(); - - $this->app = $this->getMockBuilder('OCA\FilesAccessControl\AppInfo\Application') - ->disableOriginalConstructor() - ->getMock(); - - $this->dispatcher = $this->getMockBuilder('Symfony\Component\EventDispatcher\EventDispatcherInterface') - ->getMock(); - - $this->container = $this->getMockBuilder('OCP\AppFramework\IAppContainer')->getMock(); + $this->l = $this->createMock(IL10N::class); + $this->app = $this->createMock(Application::class); + $this->dispatcher = $this->createMock(EventDispatcherInterface::class); + $this->container = $this->createMock(IAppContainer::class); $this->admin = new Admin($this->l, $this->app, $this->dispatcher); } public function testGetForm() { $this->dispatcher->expects($this->once()) - ->method('dispatch') - ->with('OCP\WorkflowEngine::loadAdditionalSettingScripts'); + ->method('dispatch') + ->with('OCP\WorkflowEngine::loadAdditionalSettingScripts'); - $this->l->expects($this->exactly(2)) - ->method('t') - ->willReturnArgument(1); + $this->l->expects($this->exactly(3)) + ->method('t') + ->willReturnArgument(1); $this->container->expects($this->once()) ->method('getAppName') @@ -83,6 +77,6 @@ public function testGetForm() { ->willReturn($this->container); $result = $this->admin->getForm(); - $this->assertInstanceOf('OCP\AppFramework\Http\TemplateResponse', $result); + $this->assertInstanceOf(TemplateResponse::class, $result); } }