summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/lib/publicnamespace/ContactsTest.php (renamed from tests/lib/public/contacts.php)30
-rw-r--r--tests/lib/publicnamespace/OCPConfigTest.php (renamed from tests/lib/public/ocpconfig.php)4
-rw-r--r--tests/lib/publicnamespace/UtilTest.php (renamed from tests/lib/public/util.php)7
3 files changed, 24 insertions, 17 deletions
diff --git a/tests/lib/public/contacts.php b/tests/lib/publicnamespace/ContactsTest.php
index 151e98d3905..8b07c4831b6 100644
--- a/tests/lib/public/contacts.php
+++ b/tests/lib/publicnamespace/ContactsTest.php
@@ -19,15 +19,17 @@
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
-class Test_Contacts extends \Test\TestCase {
+namespace Test\PublicNamespace;
+
+class ContactsTest extends \Test\TestCase {
protected function setUp() {
parent::setUp();
- OCP\Contacts::clear();
+ \OCP\Contacts::clear();
}
public function testDisabledIfEmpty() {
// pretty simple
- $this->assertFalse(OCP\Contacts::isEnabled());
+ $this->assertFalse(\OCP\Contacts::isEnabled());
}
public function testEnabledAfterRegister() {
@@ -41,19 +43,19 @@ class Test_Contacts extends \Test\TestCase {
->method('getKey');
// not enabled before register
- $this->assertFalse(OCP\Contacts::isEnabled());
+ $this->assertFalse(\OCP\Contacts::isEnabled());
// register the address book
- OCP\Contacts::registerAddressBook($stub);
+ \OCP\Contacts::registerAddressBook($stub);
// contacts api shall be enabled
- $this->assertTrue(OCP\Contacts::isEnabled());
+ $this->assertTrue(\OCP\Contacts::isEnabled());
// unregister the address book
- OCP\Contacts::unregisterAddressBook($stub);
+ \OCP\Contacts::unregisterAddressBook($stub);
// not enabled after register
- $this->assertFalse(OCP\Contacts::isEnabled());
+ $this->assertFalse(\OCP\Contacts::isEnabled());
}
public function testAddressBookEnumeration() {
@@ -69,8 +71,8 @@ class Test_Contacts extends \Test\TestCase {
->will($this->returnValue('A very simple Addressbook'));
// register the address book
- OCP\Contacts::registerAddressBook($stub);
- $all_books = OCP\Contacts::getAddressBooks();
+ \OCP\Contacts::registerAddressBook($stub);
+ $all_books = \OCP\Contacts::getAddressBooks();
$this->assertEquals(1, count($all_books));
$this->assertEquals('A very simple Addressbook', $all_books['SIMPLE_ADDRESS_BOOK']);
@@ -101,15 +103,15 @@ class Test_Contacts extends \Test\TestCase {
$stub2->expects($this->any())->method('search')->will($this->returnValue($searchResult2));
// register the address books
- OCP\Contacts::registerAddressBook($stub1);
- OCP\Contacts::registerAddressBook($stub2);
- $all_books = OCP\Contacts::getAddressBooks();
+ \OCP\Contacts::registerAddressBook($stub1);
+ \OCP\Contacts::registerAddressBook($stub2);
+ $all_books = \OCP\Contacts::getAddressBooks();
// assert the count - doesn't hurt
$this->assertEquals(2, count($all_books));
// perform the search
- $result = OCP\Contacts::search('x', array());
+ $result = \OCP\Contacts::search('x', array());
// we expect 4 hits
$this->assertEquals(4, count($result));
diff --git a/tests/lib/public/ocpconfig.php b/tests/lib/publicnamespace/OCPConfigTest.php
index 947d2b3c9ef..44fd234735e 100644
--- a/tests/lib/public/ocpconfig.php
+++ b/tests/lib/publicnamespace/OCPConfigTest.php
@@ -19,7 +19,9 @@
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
-class Test_OCPConfig extends \Test\TestCase {
+namespace Test\PublicNamespace;
+
+class OCPConfigTest extends \Test\TestCase {
public function testSetAppValueIfSetToNull() {
diff --git a/tests/lib/public/util.php b/tests/lib/publicnamespace/UtilTest.php
index ebc4f70079b..31d1f9fb0ee 100644
--- a/tests/lib/public/util.php
+++ b/tests/lib/publicnamespace/UtilTest.php
@@ -19,10 +19,13 @@
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
-class Test_Public_Util extends \Test\TestCase {
+namespace Test\PublicNamespace;
+
+
+class UtilTest extends \Test\TestCase {
protected function setUp() {
parent::setUp();
- OCP\Contacts::clear();
+ \OCP\Contacts::clear();
}
/**