19declare(strict_types=1);
21use PHPUnit\Framework\TestCase;
30 $rbac_mock = $this->createMock(\ilRbacReview::class);
31 $user_mock = $this->createMock(\ilObjUser::class);
33 $general_policy = new \UploadPolicy(
44 new \DateTimeImmutable(),
45 new \DateTimeImmutable()
48 $specifiy_policy = new \UploadPolicy(
56 new \DateTimeImmutable(
'today midnight'),
57 new \DateTimeImmutable(
'tomorrow midnight'),
59 new \DateTimeImmutable(),
60 new \DateTimeImmutable()
66 [$general_policy, $specifiy_policy]
69 $this->assertSame(1000,
$resolver->getUserUploadSizeLimitInBytes() / 1000 / 1000);
71 $specifiy_policy_expired = new \UploadPolicy(
80 new \DateTimeImmutable(
'yesterday midnight'),
82 new \DateTimeImmutable(),
83 new \DateTimeImmutable()
89 [$general_policy, $specifiy_policy_expired]
92 $this->assertSame(10,
$resolver->getUserUploadSizeLimitInBytes() / 1000 / 1000);
foreach($components as $component) $resolver
const SCOPE_DEFINITION_GLOBAL
const AUDIENCE_TYPE_ALL_USERS