diff options
author | Arthur Schiwon <blizzz@owncloud.com> | 2015-12-03 17:23:22 +0100 |
---|---|---|
committer | Arthur Schiwon <blizzz@owncloud.com> | 2015-12-09 14:34:23 +0100 |
commit | d3692c32837a54198f8f8a00713d93dd64db8e61 (patch) | |
tree | eccf0f81374cd7e57af5e66c0d1e2ff1619f4a0c | |
parent | b44a33f68ff705752c55a8572ce7d445336b9080 (diff) | |
download | nextcloud-server-d3692c32837a54198f8f8a00713d93dd64db8e61.tar.gz nextcloud-server-d3692c32837a54198f8f8a00713d93dd64db8e61.zip |
namespaces for tests
-rw-r--r-- | tests/lib/comments/comment.php | 6 | ||||
-rw-r--r-- | tests/lib/comments/fakefactory.php | 13 | ||||
-rw-r--r-- | tests/lib/comments/manager.php | 5 |
3 files changed, 15 insertions, 9 deletions
diff --git a/tests/lib/comments/comment.php b/tests/lib/comments/comment.php index 790aca42967..f00dfd527f1 100644 --- a/tests/lib/comments/comment.php +++ b/tests/lib/comments/comment.php @@ -1,6 +1,10 @@ <?php -class Test_Comments_Comment extends Test\TestCase +namespace Test\Comments; + +use Test\TestCase; + +class Test_Comments_Comment extends TestCase { public function testSettersValidInput() { diff --git a/tests/lib/comments/fakefactory.php b/tests/lib/comments/fakefactory.php index 15b267b721e..0fa68e4cb0c 100644 --- a/tests/lib/comments/fakefactory.php +++ b/tests/lib/comments/fakefactory.php @@ -1,14 +1,13 @@ <?php +namespace Test\Comments; + +use Test\TestCase; + /** * Class Test_Comments_FakeFactory - * - * this class does not contain any tests. It's sole purpose is to return - * a mock of \OCP\Comments\ICommentsManager when getManager() is called. - * For mock creation and auto-loading it extends Test\TestCase. I am, uh, really - * sorry for this hack. */ -class Test_Comments_FakeFactory extends Test\TestCase implements \OCP\Comments\ICommentsManagerFactory { +class Test_Comments_FakeFactory extends TestCase implements \OCP\Comments\ICommentsManagerFactory { public function getManager() { return $this->getMock('\OCP\Comments\ICommentsManager'); @@ -20,7 +19,7 @@ class Test_Comments_FakeFactory extends Test\TestCase implements \OCP\Comments\I $managerMock = $this->getMock('\OCP\Comments\ICommentsManager'); - $config->setSystemValue('comments.managerFactory', 'Test_Comments_FakeFactory'); + $config->setSystemValue('comments.managerFactory', '\Test\Comments\Test_Comments_FakeFactory'); $manager = \OC::$server->getCommentsManager(); $this->assertEquals($managerMock, $manager); diff --git a/tests/lib/comments/manager.php b/tests/lib/comments/manager.php index 3543393308b..d5c415c250a 100644 --- a/tests/lib/comments/manager.php +++ b/tests/lib/comments/manager.php @@ -1,13 +1,16 @@ <?php +namespace Test\Comments; + use OCP\Comments\ICommentsManager; +use Test\TestCase; /** * Class Test_Comments_Manager * * @group DB */ -class Test_Comments_Manager extends Test\TestCase +class Test_Comments_Manager extends TestCase { public function setUp() { |