diff options
author | Thomas Müller <thomas.mueller@tmit.eu> | 2016-04-28 15:15:34 +0200 |
---|---|---|
committer | Thomas Müller <thomas.mueller@tmit.eu> | 2016-05-02 08:52:06 +0200 |
commit | e049953d1af24feeb57796ac4025f0f607ac1cdf (patch) | |
tree | 7b599af5deab65048396c6b17ed8f24b10f43f86 /tests/lib | |
parent | 54f45f95f51dc14d6a7126170b3277a3ad57b608 (diff) | |
download | nextcloud-server-e049953d1af24feeb57796ac4025f0f607ac1cdf.tar.gz nextcloud-server-e049953d1af24feeb57796ac4025f0f607ac1cdf.zip |
OC_Installer -> \OC\Installer
Diffstat (limited to 'tests/lib')
-rw-r--r-- | tests/lib/InstallerTest.php (renamed from tests/lib/installer.php) | 29 |
1 files changed, 17 insertions, 12 deletions
diff --git a/tests/lib/installer.php b/tests/lib/InstallerTest.php index ca210ba31ef..e1c17b841a2 100644 --- a/tests/lib/installer.php +++ b/tests/lib/InstallerTest.php @@ -6,7 +6,12 @@ * See the COPYING-README file. */ -class Test_Installer extends \Test\TestCase { +namespace Test; + + +use OC\Installer; + +class InstallerTest extends TestCase { private static $appid = 'testapp'; private $appstore; @@ -17,11 +22,11 @@ class Test_Installer extends \Test\TestCase { $config = \OC::$server->getConfig(); $this->appstore = $config->setSystemValue('appstoreenabled', true); $config->setSystemValue('appstoreenabled', true); - OC_Installer::removeApp(self::$appid); + Installer::removeApp(self::$appid); } protected function tearDown() { - OC_Installer::removeApp(self::$appid); + Installer::removeApp(self::$appid); \OC::$server->getConfig()->setSystemValue('appstoreenabled', $this->appstore); parent::tearDown(); @@ -33,7 +38,7 @@ class Test_Installer extends \Test\TestCase { $pathOfTestApp .= 'testapp.zip'; $tmp = \OC::$server->getTempManager()->getTemporaryFile('.zip'); - OC_Helper::copyr($pathOfTestApp, $tmp); + \OC_Helper::copyr($pathOfTestApp, $tmp); $data = array( 'path' => $tmp, @@ -44,8 +49,8 @@ class Test_Installer extends \Test\TestCase { ] ); - OC_Installer::installApp($data); - $isInstalled = OC_Installer::isInstalled(self::$appid); + Installer::installApp($data); + $isInstalled = Installer::isInstalled(self::$appid); $this->assertTrue($isInstalled); } @@ -56,7 +61,7 @@ class Test_Installer extends \Test\TestCase { $pathOfOldTestApp .= 'testapp.zip'; $oldTmp = \OC::$server->getTempManager()->getTemporaryFile('.zip'); - OC_Helper::copyr($pathOfOldTestApp, $oldTmp); + \OC_Helper::copyr($pathOfOldTestApp, $oldTmp); $oldData = array( 'path' => $oldTmp, @@ -72,7 +77,7 @@ class Test_Installer extends \Test\TestCase { $pathOfNewTestApp .= 'testapp2.zip'; $newTmp = \OC::$server->getTempManager()->getTemporaryFile('.zip'); - OC_Helper::copyr($pathOfNewTestApp, $newTmp); + \OC_Helper::copyr($pathOfNewTestApp, $newTmp); $newData = array( 'path' => $newTmp, @@ -83,11 +88,11 @@ class Test_Installer extends \Test\TestCase { ] ); - OC_Installer::installApp($oldData); - $oldVersionNumber = OC_App::getAppVersion(self::$appid); + Installer::installApp($oldData); + $oldVersionNumber = \OC_App::getAppVersion(self::$appid); - OC_Installer::updateApp($newData); - $newVersionNumber = OC_App::getAppVersion(self::$appid); + Installer::updateApp($newData); + $newVersionNumber = \OC_App::getAppVersion(self::$appid); $this->assertNotEquals($oldVersionNumber, $newVersionNumber); } |