. * */ class Test_OC_OCS_Privatedata extends PHPUnit_Framework_TestCase { private $appKey; public function setUp() { \OC::$session->set('user_id', 'user1'); $this->appKey = uniqid('app'); } public function tearDown() { } public function testGetEmptyOne() { $params = array('app' => $this->appKey, 'key' => '123'); $result = OC_OCS_Privatedata::get($params); $this->assertEquals(100, $result->getStatusCode()); $data = $result->getData(); $this->assertTrue(is_array($data)); $this->assertEquals(0, sizeof($data)); } public function testGetEmptyAll() { $params = array('app' => $this->appKey); $result = OC_OCS_Privatedata::get($params); $this->assertEquals(100, $result->getStatusCode()); $data = $result->getData(); $this->assertTrue(is_array($data)); $this->assertEquals(0, sizeof($data)); } }