Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
4 changes: 2 additions & 2 deletions appinfo/info.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@
<description>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.</description>
<licence>AGPL</licence>
<author>Morris Jobke</author>
<version>1.2.2</version>
<version>1.2.3</version>
<namespace>FilesAccessControl</namespace>

<category>other</category>
<category>files</category>
<website>https://github.com/nextcloud/files_accesscontrol</website>
<bugs>https://github.com/nextcloud/files_accesscontrol/issues</bugs>
<repository type="git">https://github.com/nextcloud/files_accesscontrol.git</repository>
Expand Down
38 changes: 16 additions & 22 deletions tests/Settings/AdminTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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')
Expand All @@ -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);
}
}