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->getContainer()->registerCapability(\OCA\Theming\Capabilities::class);
|
||||
$app->getContainer()->registerCapability('OCA\Theming\Capabilities');
|
||||
|
|
|
@ -22,17 +22,8 @@
|
|||
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\Capabilities\ICapability;
|
||||
use OCP\IL10N;
|
||||
use OCP\IURLGenerator;
|
||||
use OCP\Settings\ISection;
|
||||
use OCP\Settings\ISettings;
|
||||
use Test\TestCase;
|
||||
|
||||
/**
|
||||
|
@ -54,10 +45,10 @@ class CapabilitiesTest extends TestCase {
|
|||
protected function setUp() {
|
||||
parent::setUp();
|
||||
|
||||
$this->theming = $this->getMockBuilder(ThemingDefaults::class)
|
||||
$this->theming = $this->getMockBuilder('OCA\Theming\ThemingDefaults')
|
||||
->disableOriginalConstructor()
|
||||
->getMock();
|
||||
$this->url = $this->getMockBuilder(IURLGenerator::class)
|
||||
$this->url = $this->getMockBuilder('OCP\IURLGenerator')
|
||||
->getMock();
|
||||
|
||||
$this->capabilities = new Capabilities($this->theming, $this->url);
|
||||
|
|
|
@ -21,17 +21,7 @@
|
|||
|
||||
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\Capabilities\ICapability;
|
||||
use OCP\IL10N;
|
||||
use OCP\Settings\ISection;
|
||||
use OCP\Settings\ISettings;
|
||||
use Test\TestCase;
|
||||
|
||||
/**
|
||||
|
@ -55,23 +45,23 @@ class ServicesTest extends TestCase {
|
|||
|
||||
public function queryData() {
|
||||
return [
|
||||
[IL10N::class],
|
||||
['OCP\IL10N'],
|
||||
|
||||
// lib/
|
||||
[Capabilities::class],
|
||||
[Capabilities::class, ICapability::class],
|
||||
[ThemingDefaults::class],
|
||||
[ThemingDefaults::class, \OC_Defaults::class],
|
||||
[Util::class],
|
||||
['OCA\Theming\Capabilities'],
|
||||
['OCA\Theming\Capabilities', 'OCP\Capabilities\ICapability'],
|
||||
['OCA\Theming\ThemingDefaults'],
|
||||
['OCA\Theming\ThemingDefaults', 'OC_Defaults'],
|
||||
['OCA\Theming\Util'],
|
||||
|
||||
// Controller
|
||||
[ThemingController::class, ThemingController::class],
|
||||
['OCA\Theming\Controller\ThemingController'],
|
||||
|
||||
// Settings
|
||||
[Admin::class],
|
||||
[Admin::class, ISettings::class],
|
||||
[Section::class],
|
||||
[Section::class, ISection::class],
|
||||
['OCA\Theming\Settings\Admin'],
|
||||
['OCA\Theming\Settings\Admin', 'OCP\Settings\ISettings'],
|
||||
['OCA\Theming\Settings\Section'],
|
||||
['OCA\Theming\Settings\Section', 'OCP\Settings\ISection'],
|
||||
];
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue