summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorJoas Schilling <nickvergessen@owncloud.com>2015-06-11 10:47:51 +0200
committerJoas Schilling <nickvergessen@owncloud.com>2015-06-11 10:48:30 +0200
commit05f1ff871578f9d2663c8217df1af40494c9ded6 (patch)
treeceb843360bc9002c95a3d60179411390ed51f538 /tests
parent672b8752e4491f9a2749d133dad49da66be2d2dd (diff)
downloadnextcloud-server-05f1ff871578f9d2663c8217df1af40494c9ded6.tar.gz
nextcloud-server-05f1ff871578f9d2663c8217df1af40494c9ded6.zip
Correctly import NullCache class
Diffstat (limited to 'tests')
-rw-r--r--tests/lib/server.php51
1 files changed, 51 insertions, 0 deletions
diff --git a/tests/lib/server.php b/tests/lib/server.php
new file mode 100644
index 00000000000..eabc58f2bce
--- /dev/null
+++ b/tests/lib/server.php
@@ -0,0 +1,51 @@
+<?php
+/**
+ * @author Joas Schilling <nickvergessen@owncloud.com>
+ *
+ * @copyright Copyright (c) 2015, ownCloud, Inc.
+ * @license AGPL-3.0
+ *
+ * This code is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License, version 3,
+ * as published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License, version 3,
+ * along with this program. If not, see <http://www.gnu.org/licenses/>
+ *
+ */
+
+namespace Test;
+
+class Server extends \Test\TestCase {
+ /** @var \OC\Server */
+ protected $server;
+
+
+ public function setUp() {
+ parent::setUp();
+ $this->server = new \OC\Server('');
+ }
+
+ public function dataTestQuery() {
+ return [
+ ['NullCache', '\OC\Memcache\NullCache'],
+ ['NullCache', '\OC\Memcache\Cache'],
+ ['NullCache', '\OCP\IMemcache'],
+ ];
+ }
+
+ /**
+ * @dataProvider dataTestQuery
+ *
+ * @param string $serviceName
+ * @param string $instanceOf
+ */
+ public function testQuery($serviceName, $instanceOf) {
+ $this->assertInstanceOf($instanceOf, $this->server->query($serviceName), 'Service ' . $serviceName . ' did not return the right class');
+ }
+}