mirror of
https://github.com/nuxsmin/sysPass.git
synced 2026-03-23 00:36:52 +01:00
* [FIX] Fixed wrong behavior when searching for accounts on accounts manager. Thanks to @Weptun for the feedback. Closes #1271
* [ADD] Added missing tests * [MOD] Code cleanup Signed-off-by: Rubén D <nuxsmin@syspass.org>
This commit is contained in:
@@ -24,7 +24,11 @@
|
||||
|
||||
namespace SP\Tests\SP\Repositories;
|
||||
|
||||
use DI\DependencyException;
|
||||
use DI\NotFoundException;
|
||||
use SP\Core\Context\ContextException;
|
||||
use SP\Core\Exceptions\ConstraintException;
|
||||
use SP\Core\Exceptions\QueryException;
|
||||
use SP\DataModel\UserToUserGroupData;
|
||||
use SP\Repositories\UserGroup\UserToUserGroupRepository;
|
||||
use SP\Storage\Database\DatabaseConnectionData;
|
||||
@@ -44,9 +48,9 @@ class UserToUserGroupRepositoryTest extends DatabaseTestCase
|
||||
private static $repository;
|
||||
|
||||
/**
|
||||
* @throws \DI\DependencyException
|
||||
* @throws \DI\NotFoundException
|
||||
* @throws \SP\Core\Context\ContextException
|
||||
* @throws DependencyException
|
||||
* @throws NotFoundException
|
||||
* @throws ContextException
|
||||
*/
|
||||
public static function setUpBeforeClass()
|
||||
{
|
||||
@@ -62,8 +66,8 @@ class UserToUserGroupRepositoryTest extends DatabaseTestCase
|
||||
}
|
||||
|
||||
/**
|
||||
* @throws \SP\Core\Exceptions\ConstraintException
|
||||
* @throws \SP\Core\Exceptions\QueryException
|
||||
* @throws ConstraintException
|
||||
* @throws QueryException
|
||||
*/
|
||||
public function testGetGroupsForUser()
|
||||
{
|
||||
@@ -90,8 +94,8 @@ class UserToUserGroupRepositoryTest extends DatabaseTestCase
|
||||
}
|
||||
|
||||
/**
|
||||
* @throws \SP\Core\Exceptions\ConstraintException
|
||||
* @throws \SP\Core\Exceptions\QueryException
|
||||
* @throws ConstraintException
|
||||
* @throws QueryException
|
||||
*/
|
||||
public function testUpdate()
|
||||
{
|
||||
@@ -121,7 +125,7 @@ class UserToUserGroupRepositoryTest extends DatabaseTestCase
|
||||
|
||||
/**
|
||||
* @throws ConstraintException
|
||||
* @throws \SP\Core\Exceptions\QueryException
|
||||
* @throws QueryException
|
||||
*/
|
||||
public function testGetById()
|
||||
{
|
||||
@@ -155,7 +159,7 @@ class UserToUserGroupRepositoryTest extends DatabaseTestCase
|
||||
|
||||
/**
|
||||
* @throws ConstraintException
|
||||
* @throws \SP\Core\Exceptions\QueryException
|
||||
* @throws QueryException
|
||||
*/
|
||||
public function testDelete()
|
||||
{
|
||||
@@ -168,7 +172,7 @@ class UserToUserGroupRepositoryTest extends DatabaseTestCase
|
||||
|
||||
/**
|
||||
* @throws ConstraintException
|
||||
* @throws \SP\Core\Exceptions\QueryException
|
||||
* @throws QueryException
|
||||
*/
|
||||
public function testAdd()
|
||||
{
|
||||
@@ -204,8 +208,8 @@ class UserToUserGroupRepositoryTest extends DatabaseTestCase
|
||||
}
|
||||
|
||||
/**
|
||||
* @throws \SP\Core\Exceptions\ConstraintException
|
||||
* @throws \SP\Core\Exceptions\QueryException
|
||||
* @throws ConstraintException
|
||||
* @throws QueryException
|
||||
*/
|
||||
public function testAddDuplicated()
|
||||
{
|
||||
@@ -218,7 +222,7 @@ class UserToUserGroupRepositoryTest extends DatabaseTestCase
|
||||
|
||||
/**
|
||||
* @throws ConstraintException
|
||||
* @throws \SP\Core\Exceptions\QueryException
|
||||
* @throws QueryException
|
||||
*/
|
||||
public function testCheckUserInGroup()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user