php 5.4 and 5.5 compatibility
This commit is contained in:
parent
ebaa49f76d
commit
b626f710c1
|
@ -51,4 +51,4 @@ $linkToJs = \OC::$server->getURLGenerator()->linkToRoute(
|
||||||
);
|
);
|
||||||
|
|
||||||
$app = new \OCP\AppFramework\App('theming');
|
$app = new \OCP\AppFramework\App('theming');
|
||||||
$app->getContainer()->registerCapability(\OCA\Theming\Capabilities::class);
|
$app->getContainer()->registerCapability('OCA\Theming\Capabilities');
|
||||||
|
|
|
@ -22,17 +22,8 @@
|
||||||
namespace OCA\Theming\Tests;
|
namespace OCA\Theming\Tests;
|
||||||
|
|
||||||
use OCA\Theming\Capabilities;
|
use OCA\Theming\Capabilities;
|
||||||
use OCA\Theming\Controller\ThemingController;
|
|
||||||
use OCA\Theming\Settings\Admin;
|
|
||||||
use OCA\Theming\Settings\Section;
|
|
||||||
use OCA\Theming\ThemingDefaults;
|
use OCA\Theming\ThemingDefaults;
|
||||||
use OCA\Theming\Util;
|
|
||||||
use OCP\AppFramework\App;
|
|
||||||
use OCP\Capabilities\ICapability;
|
|
||||||
use OCP\IL10N;
|
|
||||||
use OCP\IURLGenerator;
|
use OCP\IURLGenerator;
|
||||||
use OCP\Settings\ISection;
|
|
||||||
use OCP\Settings\ISettings;
|
|
||||||
use Test\TestCase;
|
use Test\TestCase;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -54,10 +45,10 @@ class CapabilitiesTest extends TestCase {
|
||||||
protected function setUp() {
|
protected function setUp() {
|
||||||
parent::setUp();
|
parent::setUp();
|
||||||
|
|
||||||
$this->theming = $this->getMockBuilder(ThemingDefaults::class)
|
$this->theming = $this->getMockBuilder('OCA\Theming\ThemingDefaults')
|
||||||
->disableOriginalConstructor()
|
->disableOriginalConstructor()
|
||||||
->getMock();
|
->getMock();
|
||||||
$this->url = $this->getMockBuilder(IURLGenerator::class)
|
$this->url = $this->getMockBuilder('OCP\IURLGenerator')
|
||||||
->getMock();
|
->getMock();
|
||||||
|
|
||||||
$this->capabilities = new Capabilities($this->theming, $this->url);
|
$this->capabilities = new Capabilities($this->theming, $this->url);
|
||||||
|
|
|
@ -21,17 +21,7 @@
|
||||||
|
|
||||||
namespace OCA\Theming\Tests;
|
namespace OCA\Theming\Tests;
|
||||||
|
|
||||||
use OCA\Theming\Capabilities;
|
|
||||||
use OCA\Theming\Controller\ThemingController;
|
|
||||||
use OCA\Theming\Settings\Admin;
|
|
||||||
use OCA\Theming\Settings\Section;
|
|
||||||
use OCA\Theming\ThemingDefaults;
|
|
||||||
use OCA\Theming\Util;
|
|
||||||
use OCP\AppFramework\App;
|
use OCP\AppFramework\App;
|
||||||
use OCP\Capabilities\ICapability;
|
|
||||||
use OCP\IL10N;
|
|
||||||
use OCP\Settings\ISection;
|
|
||||||
use OCP\Settings\ISettings;
|
|
||||||
use Test\TestCase;
|
use Test\TestCase;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -55,23 +45,23 @@ class ServicesTest extends TestCase {
|
||||||
|
|
||||||
public function queryData() {
|
public function queryData() {
|
||||||
return [
|
return [
|
||||||
[IL10N::class],
|
['OCP\IL10N'],
|
||||||
|
|
||||||
// lib/
|
// lib/
|
||||||
[Capabilities::class],
|
['OCA\Theming\Capabilities'],
|
||||||
[Capabilities::class, ICapability::class],
|
['OCA\Theming\Capabilities', 'OCP\Capabilities\ICapability'],
|
||||||
[ThemingDefaults::class],
|
['OCA\Theming\ThemingDefaults'],
|
||||||
[ThemingDefaults::class, \OC_Defaults::class],
|
['OCA\Theming\ThemingDefaults', 'OC_Defaults'],
|
||||||
[Util::class],
|
['OCA\Theming\Util'],
|
||||||
|
|
||||||
// Controller
|
// Controller
|
||||||
[ThemingController::class, ThemingController::class],
|
['OCA\Theming\Controller\ThemingController'],
|
||||||
|
|
||||||
// Settings
|
// Settings
|
||||||
[Admin::class],
|
['OCA\Theming\Settings\Admin'],
|
||||||
[Admin::class, ISettings::class],
|
['OCA\Theming\Settings\Admin', 'OCP\Settings\ISettings'],
|
||||||
[Section::class],
|
['OCA\Theming\Settings\Section'],
|
||||||
[Section::class, ISection::class],
|
['OCA\Theming\Settings\Section', 'OCP\Settings\ISection'],
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue