diff --git a/lib/private/comments/managerfactory.php b/lib/private/comments/managerfactory.php index 0c9fce3e64..41978d0cf4 100644 --- a/lib/private/comments/managerfactory.php +++ b/lib/private/comments/managerfactory.php @@ -16,8 +16,8 @@ class ManagerFactory implements ICommentsManagerFactory { */ public function getManager() { return new Manager( - \oc::$server->getDatabaseConnection(), - \oc::$server->getLogger() + \OC::$server->getDatabaseConnection(), + \OC::$server->getLogger() ); } } diff --git a/tests/lib/comments/fakefactory.php b/tests/lib/comments/fakefactory.php index cd85a4f34c..15b267b721 100644 --- a/tests/lib/comments/fakefactory.php +++ b/tests/lib/comments/fakefactory.php @@ -15,13 +15,13 @@ class Test_Comments_FakeFactory extends Test\TestCase implements \OCP\Comments\I } public function testOverwriteDefaultManager() { - $config = \oc::$server->getConfig(); + $config = \OC::$server->getConfig(); $defaultManagerFactory = $config->getSystemValue('comments.managerFactory', '\OC\Comments\ManagerFactory'); $managerMock = $this->getMock('\OCP\Comments\ICommentsManager'); $config->setSystemValue('comments.managerFactory', 'Test_Comments_FakeFactory'); - $manager = \oc::$server->getCommentsManager(); + $manager = \OC::$server->getCommentsManager(); $this->assertEquals($managerMock, $manager); $config->setSystemValue('comments.managerFactory', $defaultManagerFactory); diff --git a/tests/lib/comments/manager.php b/tests/lib/comments/manager.php index 35a1c8a2af..3543393308 100644 --- a/tests/lib/comments/manager.php +++ b/tests/lib/comments/manager.php @@ -13,8 +13,8 @@ class Test_Comments_Manager extends Test\TestCase public function setUp() { parent::setUp(); - $sql = \oc::$server->getDatabaseConnection()->getDatabasePlatform()->getTruncateTableSQL('`*PREFIX*comments`'); - \oc::$server->getDatabaseConnection()->prepare($sql)->execute(); + $sql = \OC::$server->getDatabaseConnection()->getDatabasePlatform()->getTruncateTableSQL('`*PREFIX*comments`'); + \OC::$server->getDatabaseConnection()->prepare($sql)->execute(); } protected function addDatabaseEntry($parentId, $topmostParentId, $creationDT = null, $latestChildDT = null) { @@ -25,7 +25,7 @@ class Test_Comments_Manager extends Test\TestCase $latestChildDT = new \DateTime('yesterday'); } - $qb = \oc::$server->getDatabaseConnection()->getQueryBuilder(); + $qb = \OC::$server->getDatabaseConnection()->getQueryBuilder(); $qb ->insert('comments') ->values([ @@ -43,7 +43,7 @@ class Test_Comments_Manager extends Test\TestCase ]) ->execute(); - return \oc::$server->getDatabaseConnection()->lastInsertId('*PREFIX*comments'); + return \OC::$server->getDatabaseConnection()->lastInsertId('*PREFIX*comments'); } protected function getManager() { @@ -69,7 +69,7 @@ class Test_Comments_Manager extends Test\TestCase $creationDT = new \DateTime(); $latestChildDT = new \DateTime('yesterday'); - $qb = \oc::$server->getDatabaseConnection()->getQueryBuilder(); + $qb = \OC::$server->getDatabaseConnection()->getQueryBuilder(); $qb ->insert('comments') ->values([ @@ -87,7 +87,7 @@ class Test_Comments_Manager extends Test\TestCase ]) ->execute(); - $id = strval(\oc::$server->getDatabaseConnection()->lastInsertId('*PREFIX*comments')); + $id = strval(\OC::$server->getDatabaseConnection()->lastInsertId('*PREFIX*comments')); $comment = $manager->get($id); $this->assertTrue($comment instanceof \OCP\Comments\IComment);