@@ -314,6 +314,9 @@ |
||
314 | 314 | |
315 | 315 | } |
316 | 316 | |
317 | + /** |
|
318 | + * @param string $param |
|
319 | + */ |
|
317 | 320 | public function query($param){ |
318 | 321 | return $this->getContainer()->query($param); |
319 | 322 | } |
@@ -36,7 +36,6 @@ |
||
36 | 36 | use OCA\Chat\OCH\OCH; |
37 | 37 | use OCA\Chat\XMPP\XMPP; |
38 | 38 | use OCA\Chat\BackendManager; |
39 | -use OCA\Chat\IBackend; |
|
40 | 39 | use OCA\Chat\Middleware\ErrorMiddleware; |
41 | 40 | |
42 | 41 | /** |
@@ -8,7 +8,6 @@ |
||
8 | 8 | namespace OCA\Chat\OCH\Db; |
9 | 9 | |
10 | 10 | use OCP\AppFramework\Db\DoesNotExistException; |
11 | -use OCA\Chat\OCH\Commands\AttachFile; |
|
12 | 11 | use \OCP\AppFramework\Db\Mapper; |
13 | 12 | use \OCP\IDb; |
14 | 13 |
@@ -43,6 +43,9 @@ discard block |
||
43 | 43 | return $result; |
44 | 44 | } |
45 | 45 | |
46 | + /** |
|
47 | + * @param string $user |
|
48 | + */ |
|
46 | 49 | public function findByUser($user){ |
47 | 50 | $sql = <<<SQL |
48 | 51 | SELECT |
@@ -56,6 +59,9 @@ discard block |
||
56 | 59 | return $result; |
57 | 60 | } |
58 | 61 | |
62 | + /** |
|
63 | + * @param string $user |
|
64 | + */ |
|
59 | 65 | public function findConvsIdByUser($user){ |
60 | 66 | $sql = 'SELECT conversation_id FROM `' . $this->getTableName() . '` ' . |
61 | 67 | 'WHERE `user` = ? '; |
@@ -7,7 +7,6 @@ |
||
7 | 7 | |
8 | 8 | namespace OCA\Chat\OCH\Db; |
9 | 9 | |
10 | -use Doctrine\DBAL\Sharding\SQLAzure\SQLAzureFederationsSynchronizer; |
|
11 | 10 | use \OCP\AppFramework\Db\Mapper; |
12 | 11 | use \OCP\IDb; |
13 | 12 | use \OCP\AppFramework\Db\Entity; |
@@ -17,7 +17,6 @@ |
||
17 | 17 | use OCA\Chat\OCH\Db\InitConv; |
18 | 18 | use OCA\Chat\OCH\Db\PushMessage; |
19 | 19 | use \OCA\Chat\OCH\Db\UserOnline; |
20 | -use OCA\Chat\Db\DBException; |
|
21 | 20 | use OCA\Chat\OCH\Exceptions\RequestDataInvalid; |
22 | 21 | use OCA\Chat\OCH\Db\User; |
23 | 22 |
@@ -14,11 +14,8 @@ |
||
14 | 14 | use OCA\Chat\Core\API; |
15 | 15 | use OCA\Chat\OCH\Commands\SendChatMsg; |
16 | 16 | use OCA\Chat\App\Chat; |
17 | -use OCA\Chat\Db\DBException; |
|
18 | 17 | use OCA\Chat\OCH\Exceptions\RequestDataInvalid; |
19 | -use OCA\Chat\OCH\Db\UserOnline; |
|
20 | 18 | use OCA\Chat\OCH\Db\User; |
21 | -use OCA\Chat\OCH\Db\PushMessage; |
|
22 | 19 | |
23 | 20 | // DONE |
24 | 21 | class SendChatMsgTest extends \PHPUnit_Framework_TestCase { |
@@ -12,7 +12,6 @@ |
||
12 | 12 | |
13 | 13 | |
14 | 14 | use OCA\Chat\Core\API; |
15 | -use OCA\Chat\OCH\Commands\StartConv; |
|
16 | 15 | use OCA\Chat\App\Chat; |
17 | 16 | use \OCA\Chat\OCH\Db\UserOnline; |
18 | 17 |
@@ -15,7 +15,6 @@ |
||
15 | 15 | use OCA\Chat\OCH\Commands\SyncOnline; |
16 | 16 | use OCA\Chat\App\Chat; |
17 | 17 | use OCA\Chat\Db\DBException; |
18 | -use OCA\Chat\OCH\Exceptions\RequestDataInvalid; |
|
19 | 18 | use OCA\Chat\OCH\Db\UserOnline; |
20 | 19 | |
21 | 20 | // DONE |
@@ -25,9 +25,10 @@ |
||
25 | 25 | |
26 | 26 | /** |
27 | 27 | * Checks if a controllermethod has the expected annotations |
28 | - * @param Controller/string $controller name or instance of the controller |
|
29 | - * @param array $expected an array containing the expected annotations |
|
28 | + * @param \OCA\Chat\Controller\OCH\ApiController $controller name or instance of the controller |
|
29 | + * @param string[] $expected an array containing the expected annotations |
|
30 | 30 | * @param array $valid if you define your own annotations, pass them here |
31 | + * @param string $method |
|
31 | 32 | */ |
32 | 33 | protected function assertAnnotations($controller, $method, array $expected, |
33 | 34 | array $valid=array()){ |