mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-07 18:44:08 +00:00
fixes on tests [WIP]
This commit is contained in:
parent
56dd825f39
commit
e297d82533
@ -31,7 +31,8 @@ class ActivityRepository extends ServiceEntityRepository
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated use @link{ActivityACLAwareRepositoryInterface::findByAccompanyingPeriod}
|
||||
* @deprecated use @see{ActivityACLAwareRepositoryInterface::findByAccompanyingPeriod}
|
||||
*
|
||||
* @return Activity[]
|
||||
*/
|
||||
public function findByAccompanyingPeriod(AccompanyingPeriod $period, array $scopes, ?bool $allowNullScope = false, ?int $limit = 100, ?int $offset = 0, array $orderBy = ['date' => 'desc']): array
|
||||
|
@ -137,7 +137,7 @@ final class AsideActivityFormType extends AbstractType
|
||||
$timezoneUTC = new DateTimeZone('GMT');
|
||||
/** @var DateTimeImmutable $data */
|
||||
$data = $formEvent->getData() === null ?
|
||||
DateTime::createFromFormat('U', 300) :
|
||||
DateTime::createFromFormat('U', '300') :
|
||||
$formEvent->getData();
|
||||
$seconds = $data->getTimezone()->getOffset($data);
|
||||
$data->setTimeZone($timezoneUTC);
|
||||
|
@ -145,7 +145,7 @@ class EventSearch extends AbstractSearch
|
||||
{
|
||||
// add security clauses
|
||||
$reachableCenters = $this->helper
|
||||
->getReachableCenters($this->user, new Role('CHILL_EVENT_SEE'));
|
||||
->getReachableCenters($this->user, 'CHILL_EVENT_SEE');
|
||||
|
||||
if (count($reachableCenters) === 0) {
|
||||
// add a clause to block all events
|
||||
|
@ -108,7 +108,7 @@ class PasswordController extends AbstractController
|
||||
$username = $query->get(TokenManager::USERNAME_CANONICAL);
|
||||
$hash = $query->getAlnum(TokenManager::HASH);
|
||||
$token = $query->getAlnum(TokenManager::TOKEN);
|
||||
$timestamp = $query->getInt(TokenManager::TIMESTAMP);
|
||||
$timestamp = $query->getAlnum(TokenManager::TIMESTAMP);
|
||||
$user = $this->getDoctrine()->getRepository(User::class)
|
||||
->findOneByUsernameCanonical($username);
|
||||
|
||||
|
@ -545,7 +545,7 @@ class ExportManager
|
||||
if (null === $centers) {
|
||||
$centers = $this->authorizationHelper->getReachableCenters(
|
||||
$this->user,
|
||||
$role
|
||||
$role->getName()
|
||||
);
|
||||
}
|
||||
|
||||
@ -585,7 +585,7 @@ class ExportManager
|
||||
'center' => $center,
|
||||
'circles' => $this->authorizationHelper->getReachableScopes(
|
||||
$this->user,
|
||||
$element->requiredRole(),
|
||||
$element->requiredRole()->getName(),
|
||||
$center
|
||||
),
|
||||
];
|
||||
|
@ -72,7 +72,7 @@ class TokenManager
|
||||
];
|
||||
}
|
||||
|
||||
public function verify($hash, $token, User $user, $timestamp)
|
||||
public function verify($hash, $token, User $user, string $timestamp)
|
||||
{
|
||||
$token = hex2bin(trim($token));
|
||||
|
||||
|
@ -247,7 +247,7 @@ final class AuthorizationHelperTest extends KernelTestCase
|
||||
$expectedResult,
|
||||
Scope $testedScope,
|
||||
User $user,
|
||||
Role $role,
|
||||
string $role,
|
||||
Center $center,
|
||||
$message
|
||||
) {
|
||||
|
@ -122,7 +122,7 @@ class SocialIssue
|
||||
}
|
||||
|
||||
/**
|
||||
* get all the ancestors of the social issue
|
||||
* get all the ancestors of the social issue.
|
||||
*
|
||||
* @param bool $includeThis if the array in the result must include the present SocialIssue
|
||||
*/
|
||||
@ -135,7 +135,7 @@ class SocialIssue
|
||||
}
|
||||
|
||||
$current = $this;
|
||||
|
||||
|
||||
while ($current->hasParent()) {
|
||||
$ancestors[] = $current = $current->getParent();
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user