Modified: shindig/branches/php_namespace_refactoring/php/test/social/GroupsRestTest.php URL: http://svn.apache.org/viewvc/shindig/branches/php_namespace_refactoring/php/test/social/GroupsRestTest.php?rev=1190087&r1=1190086&r2=1190087&view=diff ============================================================================== --- shindig/branches/php_namespace_refactoring/php/test/social/GroupsRestTest.php (original) +++ shindig/branches/php_namespace_refactoring/php/test/social/GroupsRestTest.php Thu Oct 27 23:26:06 2011 @@ -1,4 +1,6 @@ <?php +namespace apache\shindig\test\social; + /** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file @@ -22,14 +24,14 @@ require_once 'RestBase.php'; class GroupsRestTest extends RestBase { - - public function testGroupsLifeCycleInJson() { + + public function testGroupsLifeCycleInJson() { // Get the groups for the user. $ret = $this->curlRest('/groups/john.doe', '', 'application/json', 'GET'); $retDecoded = json_decode($ret, true); $this->assertTrue($ret != $retDecoded && $ret != null, "Invalid json string in return: $ret."); $this->assertTrue(isset($retDecoded['entry']) && isset($retDecoded['entry']["john.doe"]) - && isset($retDecoded['entry']["john.doe"][0]) - && $retDecoded['entry']["john.doe"][0] == '1', "Unexpected return value: $ret."); + && isset($retDecoded['entry']["john.doe"][0]) + && $retDecoded['entry']["john.doe"][0] == '1', "Unexpected return value: $ret."); } }
Modified: shindig/branches/php_namespace_refactoring/php/test/social/IdSpecTest.php URL: http://svn.apache.org/viewvc/shindig/branches/php_namespace_refactoring/php/test/social/IdSpecTest.php?rev=1190087&r1=1190086&r2=1190087&view=diff ============================================================================== --- shindig/branches/php_namespace_refactoring/php/test/social/IdSpecTest.php (original) +++ shindig/branches/php_namespace_refactoring/php/test/social/IdSpecTest.php Thu Oct 27 23:26:06 2011 @@ -1,4 +1,7 @@ <?php +namespace apache\shindig\test\social; +use apache\shindig\social\model\IdSpec; + /** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file @@ -21,7 +24,7 @@ /** * IdSpec test case. */ -class IdSpecTest extends PHPUnit_Framework_TestCase { +class IdSpecTest extends \PHPUnit_Framework_TestCase { /** * @var IdSpec Modified: shindig/branches/php_namespace_refactoring/php/test/social/InputActivitiesConverterTest.php URL: http://svn.apache.org/viewvc/shindig/branches/php_namespace_refactoring/php/test/social/InputActivitiesConverterTest.php?rev=1190087&r1=1190086&r2=1190087&view=diff ============================================================================== --- shindig/branches/php_namespace_refactoring/php/test/social/InputActivitiesConverterTest.php (original) +++ shindig/branches/php_namespace_refactoring/php/test/social/InputActivitiesConverterTest.php Thu Oct 27 23:26:06 2011 @@ -1,4 +1,7 @@ <?php +namespace apache\shindig\test\social; +use apache\shindig\social\converters\InputActivitiesConverter; + /** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file @@ -21,7 +24,7 @@ /** * InputActivitiesConverter test case. */ -class InputActivitiesConverterTest extends PHPUnit_Framework_TestCase { +class InputActivitiesConverterTest extends \PHPUnit_Framework_TestCase { /** * @var InputActivitiesConverter Modified: shindig/branches/php_namespace_refactoring/php/test/social/InputAlbumsConverterTest.php URL: http://svn.apache.org/viewvc/shindig/branches/php_namespace_refactoring/php/test/social/InputAlbumsConverterTest.php?rev=1190087&r1=1190086&r2=1190087&view=diff ============================================================================== --- shindig/branches/php_namespace_refactoring/php/test/social/InputAlbumsConverterTest.php (original) +++ shindig/branches/php_namespace_refactoring/php/test/social/InputAlbumsConverterTest.php Thu Oct 27 23:26:06 2011 @@ -1,4 +1,7 @@ <?php +namespace apache\shindig\test\social; +use apache\shindig\social\converters\InputAlbumsConverter; + /** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file @@ -21,7 +24,7 @@ /** * InputAlbumsConverter test case. */ -class InputAlbumsConverterTest extends PHPUnit_Framework_TestCase { +class InputAlbumsConverterTest extends \PHPUnit_Framework_TestCase { /** * @var InputAlbumsConverter Modified: shindig/branches/php_namespace_refactoring/php/test/social/InputAppDataConverterTest.php URL: http://svn.apache.org/viewvc/shindig/branches/php_namespace_refactoring/php/test/social/InputAppDataConverterTest.php?rev=1190087&r1=1190086&r2=1190087&view=diff ============================================================================== --- shindig/branches/php_namespace_refactoring/php/test/social/InputAppDataConverterTest.php (original) +++ shindig/branches/php_namespace_refactoring/php/test/social/InputAppDataConverterTest.php Thu Oct 27 23:26:06 2011 @@ -1,4 +1,7 @@ <?php +namespace apache\shindig\test\social; +use apache\shindig\social\converters\InputAppDataConverter; + /** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file @@ -21,7 +24,7 @@ /** * InputAppDataConverter test case. */ -class InputAppDataConverterTest extends PHPUnit_Framework_TestCase { +class InputAppDataConverterTest extends \PHPUnit_Framework_TestCase { /** * @var InputAppDataConverter Modified: shindig/branches/php_namespace_refactoring/php/test/social/InputInvalidateConverterTest.php URL: http://svn.apache.org/viewvc/shindig/branches/php_namespace_refactoring/php/test/social/InputInvalidateConverterTest.php?rev=1190087&r1=1190086&r2=1190087&view=diff ============================================================================== --- shindig/branches/php_namespace_refactoring/php/test/social/InputInvalidateConverterTest.php (original) +++ shindig/branches/php_namespace_refactoring/php/test/social/InputInvalidateConverterTest.php Thu Oct 27 23:26:06 2011 @@ -1,4 +1,7 @@ <?php +namespace apache\shindig\test\social; +use apache\shindig\social\converters\InputInvalidateConverter; + /** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file @@ -21,7 +24,7 @@ /** * InputAtomConverter test case. */ -class InputInvalidateConverterTest extends PHPUnit_Framework_TestCase { +class InputInvalidateConverterTest extends \PHPUnit_Framework_TestCase { /** * @var InputInvalidateConverter */ Modified: shindig/branches/php_namespace_refactoring/php/test/social/InputMediaItemsConverterTest.php URL: http://svn.apache.org/viewvc/shindig/branches/php_namespace_refactoring/php/test/social/InputMediaItemsConverterTest.php?rev=1190087&r1=1190086&r2=1190087&view=diff ============================================================================== --- shindig/branches/php_namespace_refactoring/php/test/social/InputMediaItemsConverterTest.php (original) +++ shindig/branches/php_namespace_refactoring/php/test/social/InputMediaItemsConverterTest.php Thu Oct 27 23:26:06 2011 @@ -1,4 +1,7 @@ <?php +namespace apache\shindig\test\social; +use apache\shindig\social\converters\InputMediaItemsConverter; + /** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file @@ -21,7 +24,7 @@ /** * InputAtomConverter test case. */ -class InputMediaItemsConverterTest extends PHPUnit_Framework_TestCase { +class InputMediaItemsConverterTest extends \PHPUnit_Framework_TestCase { /** * @var InputMediaItemsConverter Modified: shindig/branches/php_namespace_refactoring/php/test/social/InputMessagesConverterTest.php URL: http://svn.apache.org/viewvc/shindig/branches/php_namespace_refactoring/php/test/social/InputMessagesConverterTest.php?rev=1190087&r1=1190086&r2=1190087&view=diff ============================================================================== --- shindig/branches/php_namespace_refactoring/php/test/social/InputMessagesConverterTest.php (original) +++ shindig/branches/php_namespace_refactoring/php/test/social/InputMessagesConverterTest.php Thu Oct 27 23:26:06 2011 @@ -1,4 +1,7 @@ <?php +namespace apache\shindig\test\social; +use apache\shindig\social\converters\InputMessagesConverter; + /** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file @@ -21,7 +24,7 @@ /** * InputAtomConverter test case. */ -class InputMessagesConverterTest extends PHPUnit_Framework_TestCase { +class InputMessagesConverterTest extends \PHPUnit_Framework_TestCase { /** * @var InputMessagesConverter Modified: shindig/branches/php_namespace_refactoring/php/test/social/InputPeopleConverterTest.php URL: http://svn.apache.org/viewvc/shindig/branches/php_namespace_refactoring/php/test/social/InputPeopleConverterTest.php?rev=1190087&r1=1190086&r2=1190087&view=diff ============================================================================== --- shindig/branches/php_namespace_refactoring/php/test/social/InputPeopleConverterTest.php (original) +++ shindig/branches/php_namespace_refactoring/php/test/social/InputPeopleConverterTest.php Thu Oct 27 23:26:06 2011 @@ -1,4 +1,7 @@ <?php +namespace apache\shindig\test\social; +use apache\shindig\social\converters\InputPeopleConverter; + /** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file @@ -21,7 +24,7 @@ /** * InputAtomConverter test case. */ -class InputPeopleConverterTest extends PHPUnit_Framework_TestCase { +class InputPeopleConverterTest extends \PHPUnit_Framework_TestCase { /** * @var InputPeopleConverter Modified: shindig/branches/php_namespace_refactoring/php/test/social/JsonDbOpensocialServiceTest.php URL: http://svn.apache.org/viewvc/shindig/branches/php_namespace_refactoring/php/test/social/JsonDbOpensocialServiceTest.php?rev=1190087&r1=1190086&r2=1190087&view=diff ============================================================================== --- shindig/branches/php_namespace_refactoring/php/test/social/JsonDbOpensocialServiceTest.php (original) +++ shindig/branches/php_namespace_refactoring/php/test/social/JsonDbOpensocialServiceTest.php Thu Oct 27 23:26:06 2011 @@ -1,4 +1,13 @@ <?php +namespace apache\shindig\test\social; +use apache\shindig\social\sample\JsonDbOpensocialService; +use apache\shindig\social\spi\UserId; +use apache\shindig\social\spi\GroupId; +use apache\shindig\social\spi\CollectionOptions; +use apache\shindig\common\sample\BasicSecurityToken; +use apache\shindig\social\model\Message; +use apache\shindig\social\model\MessageCollection; + /** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file @@ -21,7 +30,7 @@ /** * JsonDbOpensocialService test case. */ -class JsonDbOpensocialServiceTest extends PHPUnit_Framework_TestCase { +class JsonDbOpensocialServiceTest extends \PHPUnit_Framework_TestCase { /** * @var JsonDbOpensocialService Modified: shindig/branches/php_namespace_refactoring/php/test/social/JsonRpcServletTest.php URL: http://svn.apache.org/viewvc/shindig/branches/php_namespace_refactoring/php/test/social/JsonRpcServletTest.php?rev=1190087&r1=1190086&r2=1190087&view=diff ============================================================================== --- shindig/branches/php_namespace_refactoring/php/test/social/JsonRpcServletTest.php (original) +++ shindig/branches/php_namespace_refactoring/php/test/social/JsonRpcServletTest.php Thu Oct 27 23:26:06 2011 @@ -1,4 +1,7 @@ <?php +namespace apache\shindig\test\social; +use apache\shindig\social\servlet\JsonRpcServlet; + /** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file @@ -18,7 +21,7 @@ * under the License. */ -class JsonRpcServletTest extends PHPUnit_Framework_TestCase { +class JsonRpcServletTest extends \PHPUnit_Framework_TestCase { public function testParseRPCGetParameters() { Modified: shindig/branches/php_namespace_refactoring/php/test/social/MediaItemRestTest.php URL: http://svn.apache.org/viewvc/shindig/branches/php_namespace_refactoring/php/test/social/MediaItemRestTest.php?rev=1190087&r1=1190086&r2=1190087&view=diff ============================================================================== --- shindig/branches/php_namespace_refactoring/php/test/social/MediaItemRestTest.php (original) +++ shindig/branches/php_namespace_refactoring/php/test/social/MediaItemRestTest.php Thu Oct 27 23:26:06 2011 @@ -1,4 +1,6 @@ <?php +namespace apache\shindig\test\social; + /** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file @@ -21,7 +23,7 @@ require_once 'RestBase.php'; class MediaItemRestTest extends RestBase { - + protected function setUp() { $postData = '{ "id" : "44332211", "thumbnailUrl" : "http://www.libpng.org/pub/png/img_png/pngnow.png", @@ -31,26 +33,26 @@ class MediaItemRestTest extends RestBase "ownerId" : "example.org:55443322", "mediaType" : "VIDEO" }'; - + $url = '/albums/1/@self'; $ret = $this->curlRest($url, $postData, 'application/json'); $this->assertFalse(empty($ret)); $album = json_decode($ret, true); $this->album = $album['entry']; } - + protected function tearDown() { // $url = '/albums/1/@self'; // $ret = $this->curlRest($url . '/' . urlencode($this->album['id']), '', 'application/json', 'DELETE'); // $this->assertTrue(empty($ret), "Delete the created album failed. Response: $ret"); } - + private function verifyLifeCycle($postData, $postDataFormat) { $url = '/mediaitems/1/@self/' . $this->album['id']; $ret = $this->curlRest($url, $postData, $postDataFormat); $mediaItem = json_decode($ret, true); $mediaItem = $mediaItem['entry']; - + $ret = $this->curlRest($url . '/' . urlencode($mediaItem['id']), '', 'application/json', 'GET'); $this->assertFalse(empty($ret)); $fetched = json_decode($ret, true); @@ -67,16 +69,16 @@ class MediaItemRestTest extends RestBase $this->assertEquals('http://changed.com/tn.png', $fetched['thumbnailUrl'], "thumbnailUrl should be same."); $this->assertEquals('image/png', $fetched['mimeType'], "mimeType should be same."); $this->assertEquals('IMAGE', $fetched['type'], "type should be same."); - + $ret = $this->curlRest($url . '/' . urlencode($mediaItem['id']), '', 'application/json', 'DELETE'); $this->assertTrue(empty($ret), "Delete the created mediaItem failed. Response: $ret"); - + $ret = $this->curlRest($url . '/' . urlencode($mediaItem['id']), '', 'application/json', 'GET'); $fetched = json_decode($ret, true); $fetched = $fetched['entry']; $this->assertTrue(empty($fetched)); } - + public function testLifeCycleInJson() { $postData = '{ "id" : "11223344", "thumbnailUrl" : "http://www.libpng.org/pub/png/img_png/pngnow.png", @@ -87,7 +89,7 @@ class MediaItemRestTest extends RestBase }'; $this->verifyLifeCycle($postData, 'application/json'); } - + public function testLifeCycleInXml() { $postData = '<?xml version="1.0" encoding="UTF-8"?> <mediaItem xmlns="http://ns.opensocial.org/2008/opensocial"> @@ -100,7 +102,7 @@ class MediaItemRestTest extends RestBase </mediaItem>'; $this->verifyLifeCycle($postData, 'application/xml'); } - + public function testLifeCycleInAtom() { $postData = '<entry xmlns="http://www.w3.org/2005/Atom"> <content type="application/xml"> @@ -120,7 +122,7 @@ class MediaItemRestTest extends RestBase </entry>'; $this->verifyLifeCycle($postData, 'application/atom+xml'); } - + public function testLifeCycleWithActivity() { // Creates the media item. $postData = '{ "id" : "11223344", @@ -167,10 +169,10 @@ class MediaItemRestTest extends RestBase } $this->assertNotNull($activityId, "Couldn't find created activity."); - + $ret = $this->curlRest($activityUrl . "/@app/$activityId", '', 'application/json', 'DELETE'); $this->assertTrue(empty($ret), "Delete activity failed. Repsonse: $ret"); - + $ret = $this->curlRest($url . '/' . urlencode($mediaItem['id']), '', 'application/json', 'DELETE'); $this->assertTrue(empty($ret), "Delete the created mediaItem failed. Response: $ret"); } Modified: shindig/branches/php_namespace_refactoring/php/test/social/MediaItemTest.php URL: http://svn.apache.org/viewvc/shindig/branches/php_namespace_refactoring/php/test/social/MediaItemTest.php?rev=1190087&r1=1190086&r2=1190087&view=diff ============================================================================== --- shindig/branches/php_namespace_refactoring/php/test/social/MediaItemTest.php (original) +++ shindig/branches/php_namespace_refactoring/php/test/social/MediaItemTest.php Thu Oct 27 23:26:06 2011 @@ -1,4 +1,7 @@ <?php +namespace apache\shindig\test\social; +use apache\shindig\social\model\MediaItem; + /** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file @@ -21,7 +24,7 @@ /** * MediaItem test case. */ -class MediaItemTest extends PHPUnit_Framework_TestCase { +class MediaItemTest extends \PHPUnit_Framework_TestCase { /** * @var MediaItem Modified: shindig/branches/php_namespace_refactoring/php/test/social/MessageRestTest.php URL: http://svn.apache.org/viewvc/shindig/branches/php_namespace_refactoring/php/test/social/MessageRestTest.php?rev=1190087&r1=1190086&r2=1190087&view=diff ============================================================================== --- shindig/branches/php_namespace_refactoring/php/test/social/MessageRestTest.php (original) +++ shindig/branches/php_namespace_refactoring/php/test/social/MessageRestTest.php Thu Oct 27 23:26:06 2011 @@ -1,4 +1,6 @@ <?php +namespace apache\shindig\test\social; + /** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file @@ -22,7 +24,7 @@ require_once 'RestBase.php'; /** * It is an integration test. Since it's may be used by the specified container implementation. - * It'd better not to depends on the data in the json DB sample. + * It'd better not to depends on the data in the json DB sample. */ class MessageRestTest extends RestBase { @@ -40,13 +42,13 @@ class MessageRestTest extends RestBase { */ private function verifyLifeCycle($postData, $postDataFormat, $randomTitle) { $url = '/messages/1/@outbox'; - + $cnt = count($this->getAllEntities($url)); - + // Creates the message. $ret = $this->curlRest($url, $postData, $postDataFormat, 'POST'); $this->assertTrue(empty($ret), "Create message failed. Response: $ret"); - + // Gets the message. $messages = $this->getAllEntities($url); $this->assertEquals($cnt + 1, count($messages), "Size of the messages is not right."); @@ -57,15 +59,15 @@ class MessageRestTest extends RestBase { } } $this->assertNotNull($fetchedMessage, "Couldn't find the created message with title $randomTitle"); - + // Deletes the message. $ret = $this->curlRest($url . '/' . urlencode($fetchedMessage['id']), '', 'application/json', 'DELETE'); $this->assertTrue(empty($ret), "Delete the created message failed. Response: $ret"); - + $messages = $this->getAllEntities($url, $randomTitle); $this->assertEquals($cnt, count($messages), "Size of the messages is not right after deletion."); } - + public function testLifeCycleInJson() { $randomTitle = "[" . rand(0, 2048) . "] message test title."; $postData = '{ @@ -92,7 +94,7 @@ class MessageRestTest extends RestBase { </message>'; $this->verifyLifeCycle($postData, 'application/xml', $randomTitle); } - + public function testLifeCycleInAtom() { $randomTitle = "[" . rand(0, 2048) . "] message test title."; $postData = '<entry xmlns="http://www.w3.org/2005/Atom" @@ -106,23 +108,23 @@ class MessageRestTest extends RestBase { </entry>'; $this->verifyLifeCycle($postData, 'application/atom+xml', $randomTitle); } - + public function testMessageCollectionLifeCycle() { $url = '/messages/1'; // Gets number of message collections in the repository. $cnt = count($this->getAllEntities($url)); - + // Creates a message collection. $createData = array(); $createData['title'] = "[" . rand(0, 2048) . "] message collection test title."; $createData['urls'] = array("http://abc.com/abc", "http://xyz.com/xyz"); $ret = $this->curlRest($url, json_encode($createData), 'application/json', 'POST'); - + // Verifies that whether the message collection is created. $retDecoded = json_decode($ret, true); $id = $retDecoded['entry']['id']; $this->assertEquals($cnt + 1, count($this->getAllEntities($url)), "Wrong size of the collections. $ret"); - + // Updates the created message collection. $newUrls = array("http://123.com/123"); $newTitle = 'new title'; @@ -130,7 +132,7 @@ class MessageRestTest extends RestBase { $updateData['id'] = $id; $updateData['title'] = $newTitle; $updateData['urls'] = $newUrls; - + $ret = $this->curlRest($url . "/$id", json_encode($updateData), 'application/json', 'PUT'); $this->assertTrue(empty($ret), "Update should return empty. $ret <$id>"); @@ -145,10 +147,10 @@ class MessageRestTest extends RestBase { } } $this->assertTrue($found, "Created message not found."); - + // Deletes the message collection. $ret = $this->curlRest($url . "/$id", '', 'application/json', 'DELETE'); - + // Verifies that the message collection is deleted. $this->assertEquals($cnt, count($this->getAllEntities($url)), "Wrong size of the collections. $ret"); } Modified: shindig/branches/php_namespace_refactoring/php/test/social/MessageTest.php URL: http://svn.apache.org/viewvc/shindig/branches/php_namespace_refactoring/php/test/social/MessageTest.php?rev=1190087&r1=1190086&r2=1190087&view=diff ============================================================================== --- shindig/branches/php_namespace_refactoring/php/test/social/MessageTest.php (original) +++ shindig/branches/php_namespace_refactoring/php/test/social/MessageTest.php Thu Oct 27 23:26:06 2011 @@ -1,4 +1,7 @@ <?php +namespace apache\shindig\test\social; +use apache\shindig\social\model\Message; + /** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file @@ -21,7 +24,7 @@ /** * Message test case. */ -class MessageTest extends PHPUnit_Framework_TestCase { +class MessageTest extends \PHPUnit_Framework_TestCase { /** * @var Message Modified: shindig/branches/php_namespace_refactoring/php/test/social/NameTest.php URL: http://svn.apache.org/viewvc/shindig/branches/php_namespace_refactoring/php/test/social/NameTest.php?rev=1190087&r1=1190086&r2=1190087&view=diff ============================================================================== --- shindig/branches/php_namespace_refactoring/php/test/social/NameTest.php (original) +++ shindig/branches/php_namespace_refactoring/php/test/social/NameTest.php Thu Oct 27 23:26:06 2011 @@ -1,4 +1,7 @@ <?php +namespace apache\shindig\test\social; +use apache\shindig\social\model\Name; + /** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file @@ -21,7 +24,7 @@ /** * Name test case. */ -class NameTest extends PHPUnit_Framework_TestCase { +class NameTest extends \PHPUnit_Framework_TestCase { /** * @var Name Modified: shindig/branches/php_namespace_refactoring/php/test/social/OrganizationTest.php URL: http://svn.apache.org/viewvc/shindig/branches/php_namespace_refactoring/php/test/social/OrganizationTest.php?rev=1190087&r1=1190086&r2=1190087&view=diff ============================================================================== --- shindig/branches/php_namespace_refactoring/php/test/social/OrganizationTest.php (original) +++ shindig/branches/php_namespace_refactoring/php/test/social/OrganizationTest.php Thu Oct 27 23:26:06 2011 @@ -1,4 +1,7 @@ <?php +namespace apache\shindig\test\social; +use apache\shindig\social\model\Organization; + /** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file @@ -21,7 +24,7 @@ /** * Organization test case. */ -class OrganizationTest extends PHPUnit_Framework_TestCase { +class OrganizationTest extends \PHPUnit_Framework_TestCase { /** * @var Organization Modified: shindig/branches/php_namespace_refactoring/php/test/social/OutputAtomConverterTest.php URL: http://svn.apache.org/viewvc/shindig/branches/php_namespace_refactoring/php/test/social/OutputAtomConverterTest.php?rev=1190087&r1=1190086&r2=1190087&view=diff ============================================================================== --- shindig/branches/php_namespace_refactoring/php/test/social/OutputAtomConverterTest.php (original) +++ shindig/branches/php_namespace_refactoring/php/test/social/OutputAtomConverterTest.php Thu Oct 27 23:26:06 2011 @@ -1,4 +1,10 @@ <?php +namespace apache\shindig\test\social; +use apache\shindig\social\converters\OutputAtomConverter; +use apache\shindig\social\service\ResponseItem; +use apache\shindig\common\sample\BasicSecurityToken; +use apache\shindig\social\service\RestRequestItem; + /** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file @@ -21,7 +27,7 @@ /** * OutputAtomConverter test case. */ -class OutputAtomConverterTest extends PHPUnit_Framework_TestCase { +class OutputAtomConverterTest extends \PHPUnit_Framework_TestCase { /** * @var OutputAtomConverter Modified: shindig/branches/php_namespace_refactoring/php/test/social/OutputJsonConverterTest.php URL: http://svn.apache.org/viewvc/shindig/branches/php_namespace_refactoring/php/test/social/OutputJsonConverterTest.php?rev=1190087&r1=1190086&r2=1190087&view=diff ============================================================================== --- shindig/branches/php_namespace_refactoring/php/test/social/OutputJsonConverterTest.php (original) +++ shindig/branches/php_namespace_refactoring/php/test/social/OutputJsonConverterTest.php Thu Oct 27 23:26:06 2011 @@ -1,4 +1,10 @@ <?php +namespace apache\shindig\test\social; +use apache\shindig\social\converters\OutputJsonConverter; +use apache\shindig\social\service\ResponseItem; +use apache\shindig\common\sample\BasicSecurityToken; +use apache\shindig\social\service\RestRequestItem; + /** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file @@ -21,7 +27,7 @@ /** * OutputJsonConverter test case. */ -class OutputJsonConverterTest extends PHPUnit_Framework_TestCase { +class OutputJsonConverterTest extends \PHPUnit_Framework_TestCase { /** * @var OutputJsonConverter Modified: shindig/branches/php_namespace_refactoring/php/test/social/OutputXmlConverterTest.php URL: http://svn.apache.org/viewvc/shindig/branches/php_namespace_refactoring/php/test/social/OutputXmlConverterTest.php?rev=1190087&r1=1190086&r2=1190087&view=diff ============================================================================== --- shindig/branches/php_namespace_refactoring/php/test/social/OutputXmlConverterTest.php (original) +++ shindig/branches/php_namespace_refactoring/php/test/social/OutputXmlConverterTest.php Thu Oct 27 23:26:06 2011 @@ -1,4 +1,10 @@ <?php +namespace apache\shindig\test\social; +use apache\shindig\social\converters\OutputXmlConverter; +use apache\shindig\social\service\ResponseItem; +use apache\shindig\common\sample\BasicSecurityToken; +use apache\shindig\social\service\RestRequestItem; + /** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file @@ -21,7 +27,7 @@ /** * OutputXmlConverter test case. */ -class OutputXmlConverterTest extends PHPUnit_Framework_TestCase { +class OutputXmlConverterTest extends \PHPUnit_Framework_TestCase { /** * @var OutputXmlConverter Modified: shindig/branches/php_namespace_refactoring/php/test/social/PersonTest.php URL: http://svn.apache.org/viewvc/shindig/branches/php_namespace_refactoring/php/test/social/PersonTest.php?rev=1190087&r1=1190086&r2=1190087&view=diff ============================================================================== --- shindig/branches/php_namespace_refactoring/php/test/social/PersonTest.php (original) +++ shindig/branches/php_namespace_refactoring/php/test/social/PersonTest.php Thu Oct 27 23:26:06 2011 @@ -1,4 +1,11 @@ <?php +namespace apache\shindig\test\social; +use apache\shindig\social\model\Person; +use apache\shindig\social\model\EnumLookingFor; +use apache\shindig\social\model\EnumDrinker; +use apache\shindig\social\model\EnumPresence; +use apache\shindig\social\model\EnumSmoker; + /** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file @@ -21,7 +28,7 @@ /** * Person test case. */ -class PersonTest extends PHPUnit_Framework_TestCase { +class PersonTest extends \PHPUnit_Framework_TestCase { /** * @var Person Modified: shindig/branches/php_namespace_refactoring/php/test/social/PhoneTest.php URL: http://svn.apache.org/viewvc/shindig/branches/php_namespace_refactoring/php/test/social/PhoneTest.php?rev=1190087&r1=1190086&r2=1190087&view=diff ============================================================================== --- shindig/branches/php_namespace_refactoring/php/test/social/PhoneTest.php (original) +++ shindig/branches/php_namespace_refactoring/php/test/social/PhoneTest.php Thu Oct 27 23:26:06 2011 @@ -1,4 +1,7 @@ <?php +namespace apache\shindig\test\social; +use apache\shindig\social\model\Phone; + /** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file @@ -21,7 +24,7 @@ /** * Phone test case. */ -class PhoneTest extends PHPUnit_Framework_TestCase { +class PhoneTest extends \PHPUnit_Framework_TestCase { /** * @var Phone Modified: shindig/branches/php_namespace_refactoring/php/test/social/ResponseItemTest.php URL: http://svn.apache.org/viewvc/shindig/branches/php_namespace_refactoring/php/test/social/ResponseItemTest.php?rev=1190087&r1=1190086&r2=1190087&view=diff ============================================================================== --- shindig/branches/php_namespace_refactoring/php/test/social/ResponseItemTest.php (original) +++ shindig/branches/php_namespace_refactoring/php/test/social/ResponseItemTest.php Thu Oct 27 23:26:06 2011 @@ -1,4 +1,7 @@ <?php +namespace apache\shindig\test\social; +use apache\shindig\social\service\ResponseItem; + /** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file @@ -21,7 +24,7 @@ /** * ResponseItem test case. */ -class ResponseItemTest extends PHPUnit_Framework_TestCase { +class ResponseItemTest extends \PHPUnit_Framework_TestCase { /** * @var ResponseItem Modified: shindig/branches/php_namespace_refactoring/php/test/social/RestBase.php URL: http://svn.apache.org/viewvc/shindig/branches/php_namespace_refactoring/php/test/social/RestBase.php?rev=1190087&r1=1190086&r2=1190087&view=diff ============================================================================== --- shindig/branches/php_namespace_refactoring/php/test/social/RestBase.php (original) +++ shindig/branches/php_namespace_refactoring/php/test/social/RestBase.php Thu Oct 27 23:26:06 2011 @@ -1,4 +1,10 @@ <?php +namespace apache\shindig\test\social; +use apache\shindig\social\sample\JsonDbOpensocialService; +use apache\shindig\social\servlet\DataServiceServlet; +use apache\shindig\common\sample\BasicSecurityToken; +use apache\shindig\common\Config; + /** * Licensed to the Apache Software Foundation (ASF) under one @@ -22,7 +28,7 @@ /** * Base class for the REST api integration tests. */ -class RestBase extends PHPUnit_Framework_TestCase { +class RestBase extends \PHPUnit_Framework_TestCase { private $securityToken; // The server to test against. You may need to add shindig to 127.0.0.1 mapping in /etc/hosts. Modified: shindig/branches/php_namespace_refactoring/php/test/social/RestFulCollectionTest.php URL: http://svn.apache.org/viewvc/shindig/branches/php_namespace_refactoring/php/test/social/RestFulCollectionTest.php?rev=1190087&r1=1190086&r2=1190087&view=diff ============================================================================== --- shindig/branches/php_namespace_refactoring/php/test/social/RestFulCollectionTest.php (original) +++ shindig/branches/php_namespace_refactoring/php/test/social/RestFulCollectionTest.php Thu Oct 27 23:26:06 2011 @@ -1,4 +1,7 @@ <?php +namespace apache\shindig\test\social; +use apache\shindig\social\spi\RestfulCollection; + /** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file @@ -19,14 +22,14 @@ */ /** - * RestFulCollection test case. + * RestfulCollection test case. */ -class RestFulCollectionTest extends PHPUnit_Framework_TestCase { - +class RestfulCollectionTest extends \PHPUnit_Framework_TestCase { + /** - * @var RestFulCollection + * @var RestfulCollection */ - private $RestFulCollection; + private $RestfulCollection; /** * Prepares the environment before running a test. @@ -34,14 +37,14 @@ class RestFulCollectionTest extends PHPU protected function setUp() { parent::setUp(); $entry = array('Entry'); - $this->RestFulCollection = new RestfulCollection($entry, 1, 1); + $this->restfulCollection = new RestfulCollection($entry, 1, 1); } /** * Cleans up the environment after running a test. */ protected function tearDown() { - $this->RestFulCollection = null; + $this->restfulCollection = null; parent::tearDown(); } @@ -51,46 +54,46 @@ class RestFulCollectionTest extends PHPU public function __construct() {} /** - * Tests RestFulCollection->__construct() + * Tests RestfulCollection->__construct() */ public function test__construct() { $entry = array('Entry'); - $this->RestFulCollection->__construct($entry, 1, 1); + $this->restfulCollection->__construct($entry, 1, 1); } /** - * Tests RestFulCollection->getEntry() + * Tests RestfulCollection->getEntry() */ public function testGetEntry() { $entry = array('Entry'); - $this->RestFulCollection->setEntry($entry); - $this->assertEquals($entry, $this->RestFulCollection->getEntry()); + $this->restfulCollection->setEntry($entry); + $this->assertEquals($entry, $this->restfulCollection->getEntry()); } /** - * Tests RestFulCollection->getStartIndex() + * Tests RestfulCollection->getStartIndex() */ public function testGetStartIndex() { - $this->RestFulCollection->setStartIndex(1); - $this->assertEquals(1, $this->RestFulCollection->getStartIndex()); + $this->restfulCollection->setStartIndex(1); + $this->assertEquals(1, $this->restfulCollection->getStartIndex()); } /** - * Tests RestFulCollection->getTotalResults() + * Tests RestfulCollection->getTotalResults() */ public function testGetTotalResults() { - $this->RestFulCollection->setTotalResults(1); - $this->assertEquals(1, $this->RestFulCollection->getTotalResults()); + $this->restfulCollection->setTotalResults(1); + $this->assertEquals(1, $this->restfulCollection->getTotalResults()); } /** - * Tests RestFulCollection->createFromEntry() + * Tests RestfulCollection->createFromEntry() */ public function testCreateFromEntry() { $entry = array('Entry'); - $restFulCollection = RestFulCollection::createFromEntry($entry); - $this->assertEquals(1, $restFulCollection->getTotalResults()); - $this->assertEquals($entry, $restFulCollection->getEntry()); - $this->assertEquals(0, $restFulCollection->getStartIndex()); + $restfulCollection = RestfulCollection::createFromEntry($entry); + $this->assertEquals(1, $restfulCollection->getTotalResults()); + $this->assertEquals($entry, $restfulCollection->getEntry()); + $this->assertEquals(0, $restfulCollection->getStartIndex()); } } Modified: shindig/branches/php_namespace_refactoring/php/test/social/RestRequestItemTest.php URL: http://svn.apache.org/viewvc/shindig/branches/php_namespace_refactoring/php/test/social/RestRequestItemTest.php?rev=1190087&r1=1190086&r2=1190087&view=diff ============================================================================== --- shindig/branches/php_namespace_refactoring/php/test/social/RestRequestItemTest.php (original) +++ shindig/branches/php_namespace_refactoring/php/test/social/RestRequestItemTest.php Thu Oct 27 23:26:06 2011 @@ -1,4 +1,9 @@ <?php +namespace apache\shindig\test\social; +use apache\shindig\social\converters\OutputJsonConverter; +use apache\shindig\common\sample\BasicSecurityToken; +use apache\shindig\social\service\RestRequestItem; + /** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file @@ -21,7 +26,7 @@ /** * RestRequestItem test case. */ -class RestRequestItemTest extends PHPUnit_Framework_TestCase { +class RestRequestItemTest extends \PHPUnit_Framework_TestCase { /** * Prepares the environment before running a test. Modified: shindig/branches/php_namespace_refactoring/php/test/social/UrlTest.php URL: http://svn.apache.org/viewvc/shindig/branches/php_namespace_refactoring/php/test/social/UrlTest.php?rev=1190087&r1=1190086&r2=1190087&view=diff ============================================================================== --- shindig/branches/php_namespace_refactoring/php/test/social/UrlTest.php (original) +++ shindig/branches/php_namespace_refactoring/php/test/social/UrlTest.php Thu Oct 27 23:26:06 2011 @@ -1,4 +1,7 @@ <?php +namespace apache\shindig\test\social; +use apache\shindig\social\model\Url; + /** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file @@ -21,7 +24,7 @@ /** * Url test case. */ -class UrlTest extends PHPUnit_Framework_TestCase { +class UrlTest extends \PHPUnit_Framework_TestCase { /** * @var Url
