summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorJoas Schilling <nickvergessen@owncloud.com>2016-02-01 12:19:48 +0100
committerJoas Schilling <nickvergessen@owncloud.com>2016-02-02 09:57:42 +0100
commitd5126b1ad43377ebbb0f4fc2d7c43267fd5e6672 (patch)
treee602854de7b4c0d55fe2878fc5f2fffc8fdf5e6b /tests
parent591613fce222d1902ac9d981ca6ae99e5aea23cc (diff)
downloadnextcloud-server-d5126b1ad43377ebbb0f4fc2d7c43267fd5e6672.tar.gz
nextcloud-server-d5126b1ad43377ebbb0f4fc2d7c43267fd5e6672.zip
Dispatch events when tags are added/updated/deleted
Diffstat (limited to 'tests')
-rw-r--r--tests/lib/systemtag/systemtagmanagertest.php15
1 files changed, 14 insertions, 1 deletions
diff --git a/tests/lib/systemtag/systemtagmanagertest.php b/tests/lib/systemtag/systemtagmanagertest.php
index f8d71177479..64220205ade 100644
--- a/tests/lib/systemtag/systemtagmanagertest.php
+++ b/tests/lib/systemtag/systemtagmanagertest.php
@@ -15,6 +15,7 @@ use OC\SystemTag\SystemTagObjectMapper;
use OCP\IDBConnection;
use OCP\SystemTag\ISystemTag;
use OCP\SystemTag\ISystemTagManager;
+use Symfony\Component\EventDispatcher\EventDispatcherInterface;
use Test\TestCase;
/**
@@ -35,11 +36,23 @@ class SystemTagManagerTest extends TestCase {
*/
private $connection;
+ /**
+ * @var EventDispatcherInterface
+ */
+ private $dispatcher;
+
public function setUp() {
parent::setUp();
$this->connection = \OC::$server->getDatabaseConnection();
- $this->tagManager = new SystemTagManager($this->connection);
+
+ $this->dispatcher = $this->getMockBuilder('Symfony\Component\EventDispatcher\EventDispatcherInterface')
+ ->getMock();
+
+ $this->tagManager = new SystemTagManager(
+ $this->connection,
+ $this->dispatcher
+ );
$this->pruneTagsTables();
}