diff options
author | Vincent Petry <pvince81@owncloud.com> | 2016-05-19 15:36:19 +0200 |
---|---|---|
committer | Vincent Petry <pvince81@owncloud.com> | 2016-05-19 15:36:19 +0200 |
commit | f42cdec4c4bc040496df9436a83e932cb1b66c75 (patch) | |
tree | 33494d493677e0d92eb96dcf404cbde065a4f50b /tests | |
parent | 0bbf825f6e6420efa1ecfd8813156b0f3080c534 (diff) | |
parent | 20f229eed966b08d5aa7b8bc5e9c929c8e5a7e3b (diff) | |
download | nextcloud-server-f42cdec4c4bc040496df9436a83e932cb1b66c75.tar.gz nextcloud-server-f42cdec4c4bc040496df9436a83e932cb1b66c75.zip |
Merge pull request #24725 from owncloud/ocs-provider-psr4
Move OCS Provider to PSR-4 namespace
Diffstat (limited to 'tests')
-rw-r--r-- | tests/lib/ocs/MapStatusCodeTest.php (renamed from tests/ocs/response.php) | 10 | ||||
-rw-r--r-- | tests/lib/ocs/ProviderTest.php (renamed from tests/ocs-provider/provider.php) | 8 |
2 files changed, 11 insertions, 7 deletions
diff --git a/tests/ocs/response.php b/tests/lib/ocs/MapStatusCodeTest.php index 919915a7c78..27ebfe209f7 100644 --- a/tests/ocs/response.php +++ b/tests/lib/ocs/MapStatusCodeTest.php @@ -1,6 +1,4 @@ <?php -use OCP\AppFramework\Http; - /** * @author Thomas Müller <thomas.mueller@tmit.eu> * @@ -21,13 +19,17 @@ use OCP\AppFramework\Http; * */ -class OcsResponseTest extends \Test\TestCase { +namespace Test\OCS; + +use OCP\AppFramework\Http; + +class MapStatusCodeTest extends \Test\TestCase { /** * @dataProvider providesStatusCodes */ public function testStatusCodeMapper($expected, $sc) { - $result = OC_API::mapStatusCodes($sc); + $result = \OC_API::mapStatusCodes($sc); $this->assertEquals($expected, $result); } diff --git a/tests/ocs-provider/provider.php b/tests/lib/ocs/ProviderTest.php index 17f557b16b5..399fd3933d9 100644 --- a/tests/ocs-provider/provider.php +++ b/tests/lib/ocs/ProviderTest.php @@ -19,7 +19,11 @@ * */ -class OcsProviderTest extends \Test\TestCase { +namespace Test\OCS; + +use OC\OCS\Provider; + +class ProviderTest extends \Test\TestCase { /** @var \OCP\IRequest */ private $request; /** @var \OCP\App\IAppManager */ @@ -30,8 +34,6 @@ class OcsProviderTest extends \Test\TestCase { public function setUp() { parent::setUp(); - require_once '../ocs-provider/provider.php'; - $this->request = $this->getMockBuilder('\\OCP\\IRequest')->getMock(); $this->appManager = $this->getMockBuilder('\\OCP\\App\\IAppManager')->getMock(); $this->ocsProvider = new Provider('ocs_provider', $this->request, $this->appManager); |