* [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:
Rubén D
2019-04-21 23:12:45 +02:00
parent b3906afa13
commit 2318796c00
366 changed files with 5141 additions and 3752 deletions

View File

@@ -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()
{