ILIAS  trunk Revision v11.0_alpha-1831-g8615d53dadb
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Modules Pages
ILIAS\MetaData\Vocabularies\Dispatch\ActionsTest Class Reference
+ Inheritance diagram for ILIAS\MetaData\Vocabularies\Dispatch\ActionsTest:
+ Collaboration diagram for ILIAS\MetaData\Vocabularies\Dispatch\ActionsTest:

Public Member Functions

 getVocabulary (Type $type, string $id, SlotIdentifier $slot=SlotIdentifier::NULL)
 
 getInfos (bool $is_deactivatable=true, bool $can_disallow_custom_input=true, bool $is_custom_input_applicable=true, bool $can_be_deleted=true)
 
 getControlledRepo ()
 
 getStandardRepo ()
 
 testActivateStandard ()
 
 testActivateControlledString ()
 
 testActivateControlledVocabValue ()
 
 testActivateCopyright ()
 
 testDeactivateNotDeactivatableException ()
 
 testDeactivateStandard ()
 
 testDeactivateControlledString ()
 
 testDeactivateControlledVocabValue ()
 
 testDeactivateCopyright ()
 
 testAllowCustomInputNotApplicableException ()
 
 testAllowCustomInputStandard ()
 
 testAllowCustomInputControlledString ()
 
 testAllowCustomInputControlledVocabValue ()
 
 testAllowCustomInputCopyright ()
 
 testDisallowCustomInputNotApplicableException ()
 
 testDisallowCustomInputCannotDisallowException ()
 
 testDisallowCustomInputStandard ()
 
 testDisallowCustomInputControlledString ()
 
 testDisallowCustomInputControlledVocabValue ()
 
 testDisallowCustomInputCopyright ()
 
 testDeleteCannotBeDeletedException ()
 
 testDeleteStandard ()
 
 testDeleteControlledString ()
 
 testDeleteControlledVocabValue ()
 
 testDeleteCopyright ()
 

Detailed Description

Definition at line 37 of file ActionsTest.php.

Member Function Documentation

◆ getControlledRepo()

ILIAS\MetaData\Vocabularies\Dispatch\ActionsTest::getControlledRepo ( )

Definition at line 111 of file ActionsTest.php.

Referenced by ILIAS\MetaData\Vocabularies\Dispatch\ActionsTest\testActivateControlledString(), ILIAS\MetaData\Vocabularies\Dispatch\ActionsTest\testActivateControlledVocabValue(), ILIAS\MetaData\Vocabularies\Dispatch\ActionsTest\testActivateCopyright(), ILIAS\MetaData\Vocabularies\Dispatch\ActionsTest\testActivateStandard(), ILIAS\MetaData\Vocabularies\Dispatch\ActionsTest\testAllowCustomInputControlledString(), ILIAS\MetaData\Vocabularies\Dispatch\ActionsTest\testAllowCustomInputControlledVocabValue(), ILIAS\MetaData\Vocabularies\Dispatch\ActionsTest\testAllowCustomInputCopyright(), ILIAS\MetaData\Vocabularies\Dispatch\ActionsTest\testAllowCustomInputNotApplicableException(), ILIAS\MetaData\Vocabularies\Dispatch\ActionsTest\testAllowCustomInputStandard(), ILIAS\MetaData\Vocabularies\Dispatch\ActionsTest\testDeactivateControlledString(), ILIAS\MetaData\Vocabularies\Dispatch\ActionsTest\testDeactivateControlledVocabValue(), ILIAS\MetaData\Vocabularies\Dispatch\ActionsTest\testDeactivateCopyright(), ILIAS\MetaData\Vocabularies\Dispatch\ActionsTest\testDeactivateNotDeactivatableException(), ILIAS\MetaData\Vocabularies\Dispatch\ActionsTest\testDeactivateStandard(), ILIAS\MetaData\Vocabularies\Dispatch\ActionsTest\testDeleteCannotBeDeletedException(), ILIAS\MetaData\Vocabularies\Dispatch\ActionsTest\testDeleteControlledString(), ILIAS\MetaData\Vocabularies\Dispatch\ActionsTest\testDeleteControlledVocabValue(), ILIAS\MetaData\Vocabularies\Dispatch\ActionsTest\testDeleteCopyright(), ILIAS\MetaData\Vocabularies\Dispatch\ActionsTest\testDeleteStandard(), ILIAS\MetaData\Vocabularies\Dispatch\ActionsTest\testDisallowCustomInputCannotDisallowException(), ILIAS\MetaData\Vocabularies\Dispatch\ActionsTest\testDisallowCustomInputControlledString(), ILIAS\MetaData\Vocabularies\Dispatch\ActionsTest\testDisallowCustomInputControlledVocabValue(), ILIAS\MetaData\Vocabularies\Dispatch\ActionsTest\testDisallowCustomInputCopyright(), ILIAS\MetaData\Vocabularies\Dispatch\ActionsTest\testDisallowCustomInputNotApplicableException(), and ILIAS\MetaData\Vocabularies\Dispatch\ActionsTest\testDisallowCustomInputStandard().

111  : ControlledRepo
112  {
113  return new class () extends NullControlledRepo {
114  public array $changes_to_active = [];
115  public array $changes_to_custom_input = [];
116  public array $exposed_deletions = [];
117 
118  public function setActiveForVocabulary(
119  string $vocab_id,
120  bool $active
121  ): void {
122  $this->changes_to_active[] = ['id' => $vocab_id, 'active' => $active];
123  }
124 
125  public function setCustomInputsAllowedForVocabulary(
126  string $vocab_id,
127  bool $custom_inputs
128  ): void {
129  $this->changes_to_custom_input[] = ['id' => $vocab_id, 'custom_inputs' => $custom_inputs];
130  }
131 
132  public function deleteVocabulary(string $vocab_id): void
133  {
134  $this->exposed_deletions[] = $vocab_id;
135  }
136  };
137  }
+ Here is the caller graph for this function:

◆ getInfos()

ILIAS\MetaData\Vocabularies\Dispatch\ActionsTest::getInfos ( bool  $is_deactivatable = true,
bool  $can_disallow_custom_input = true,
bool  $is_custom_input_applicable = true,
bool  $can_be_deleted = true 
)

Definition at line 69 of file ActionsTest.php.

References ILIAS\__construct().

Referenced by ILIAS\MetaData\Vocabularies\Dispatch\ActionsTest\testActivateControlledString(), ILIAS\MetaData\Vocabularies\Dispatch\ActionsTest\testActivateControlledVocabValue(), ILIAS\MetaData\Vocabularies\Dispatch\ActionsTest\testActivateCopyright(), ILIAS\MetaData\Vocabularies\Dispatch\ActionsTest\testActivateStandard(), ILIAS\MetaData\Vocabularies\Dispatch\ActionsTest\testAllowCustomInputControlledString(), ILIAS\MetaData\Vocabularies\Dispatch\ActionsTest\testAllowCustomInputControlledVocabValue(), ILIAS\MetaData\Vocabularies\Dispatch\ActionsTest\testAllowCustomInputCopyright(), ILIAS\MetaData\Vocabularies\Dispatch\ActionsTest\testAllowCustomInputNotApplicableException(), ILIAS\MetaData\Vocabularies\Dispatch\ActionsTest\testAllowCustomInputStandard(), ILIAS\MetaData\Vocabularies\Dispatch\ActionsTest\testDeactivateControlledString(), ILIAS\MetaData\Vocabularies\Dispatch\ActionsTest\testDeactivateControlledVocabValue(), ILIAS\MetaData\Vocabularies\Dispatch\ActionsTest\testDeactivateCopyright(), ILIAS\MetaData\Vocabularies\Dispatch\ActionsTest\testDeactivateNotDeactivatableException(), ILIAS\MetaData\Vocabularies\Dispatch\ActionsTest\testDeactivateStandard(), ILIAS\MetaData\Vocabularies\Dispatch\ActionsTest\testDeleteCannotBeDeletedException(), ILIAS\MetaData\Vocabularies\Dispatch\ActionsTest\testDeleteControlledString(), ILIAS\MetaData\Vocabularies\Dispatch\ActionsTest\testDeleteControlledVocabValue(), ILIAS\MetaData\Vocabularies\Dispatch\ActionsTest\testDeleteCopyright(), ILIAS\MetaData\Vocabularies\Dispatch\ActionsTest\testDeleteStandard(), ILIAS\MetaData\Vocabularies\Dispatch\ActionsTest\testDisallowCustomInputCannotDisallowException(), ILIAS\MetaData\Vocabularies\Dispatch\ActionsTest\testDisallowCustomInputControlledString(), ILIAS\MetaData\Vocabularies\Dispatch\ActionsTest\testDisallowCustomInputControlledVocabValue(), ILIAS\MetaData\Vocabularies\Dispatch\ActionsTest\testDisallowCustomInputCopyright(), ILIAS\MetaData\Vocabularies\Dispatch\ActionsTest\testDisallowCustomInputNotApplicableException(), and ILIAS\MetaData\Vocabularies\Dispatch\ActionsTest\testDisallowCustomInputStandard().

74  : InfosInterface {
75  return new class (
76  $is_deactivatable,
77  $can_disallow_custom_input,
78  $is_custom_input_applicable,
79  $can_be_deleted
80  ) extends NullInfos {
81  public function __construct(
82  protected bool $is_deactivatable,
83  protected bool $can_disallow_custom_input,
84  protected bool $is_custom_input_applicable,
85  protected bool $can_be_deleted
86  ) {
87  }
88 
89  public function isDeactivatable(VocabularyInterface $vocabulary): bool
90  {
91  return $this->is_deactivatable;
92  }
93 
94  public function canDisallowCustomInput(VocabularyInterface $vocabulary): bool
95  {
96  return $this->can_disallow_custom_input;
97  }
98 
99  public function isCustomInputApplicable(VocabularyInterface $vocabulary): bool
100  {
101  return $this->is_custom_input_applicable;
102  }
103 
104  public function canBeDeleted(VocabularyInterface $vocabulary): bool
105  {
106  return $this->can_be_deleted;
107  }
108  };
109  }
__construct()
Constructor setup ILIAS global object public.
Definition: class.ilias.php:76
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getStandardRepo()

ILIAS\MetaData\Vocabularies\Dispatch\ActionsTest::getStandardRepo ( )

Definition at line 139 of file ActionsTest.php.

Referenced by ILIAS\MetaData\Vocabularies\Dispatch\ActionsTest\testActivateControlledString(), ILIAS\MetaData\Vocabularies\Dispatch\ActionsTest\testActivateControlledVocabValue(), ILIAS\MetaData\Vocabularies\Dispatch\ActionsTest\testActivateCopyright(), ILIAS\MetaData\Vocabularies\Dispatch\ActionsTest\testActivateStandard(), ILIAS\MetaData\Vocabularies\Dispatch\ActionsTest\testAllowCustomInputControlledString(), ILIAS\MetaData\Vocabularies\Dispatch\ActionsTest\testAllowCustomInputControlledVocabValue(), ILIAS\MetaData\Vocabularies\Dispatch\ActionsTest\testAllowCustomInputCopyright(), ILIAS\MetaData\Vocabularies\Dispatch\ActionsTest\testAllowCustomInputNotApplicableException(), ILIAS\MetaData\Vocabularies\Dispatch\ActionsTest\testAllowCustomInputStandard(), ILIAS\MetaData\Vocabularies\Dispatch\ActionsTest\testDeactivateControlledString(), ILIAS\MetaData\Vocabularies\Dispatch\ActionsTest\testDeactivateControlledVocabValue(), ILIAS\MetaData\Vocabularies\Dispatch\ActionsTest\testDeactivateCopyright(), ILIAS\MetaData\Vocabularies\Dispatch\ActionsTest\testDeactivateNotDeactivatableException(), ILIAS\MetaData\Vocabularies\Dispatch\ActionsTest\testDeactivateStandard(), ILIAS\MetaData\Vocabularies\Dispatch\ActionsTest\testDeleteCannotBeDeletedException(), ILIAS\MetaData\Vocabularies\Dispatch\ActionsTest\testDeleteControlledString(), ILIAS\MetaData\Vocabularies\Dispatch\ActionsTest\testDeleteControlledVocabValue(), ILIAS\MetaData\Vocabularies\Dispatch\ActionsTest\testDeleteCopyright(), ILIAS\MetaData\Vocabularies\Dispatch\ActionsTest\testDeleteStandard(), ILIAS\MetaData\Vocabularies\Dispatch\ActionsTest\testDisallowCustomInputCannotDisallowException(), ILIAS\MetaData\Vocabularies\Dispatch\ActionsTest\testDisallowCustomInputControlledString(), ILIAS\MetaData\Vocabularies\Dispatch\ActionsTest\testDisallowCustomInputControlledVocabValue(), ILIAS\MetaData\Vocabularies\Dispatch\ActionsTest\testDisallowCustomInputCopyright(), ILIAS\MetaData\Vocabularies\Dispatch\ActionsTest\testDisallowCustomInputNotApplicableException(), and ILIAS\MetaData\Vocabularies\Dispatch\ActionsTest\testDisallowCustomInputStandard().

139  : StandardRepo
140  {
141  return new class () extends NullStandardRepo {
142  public array $changes_to_active = [];
143 
144  public function activateVocabulary(SlotIdentifier $slot): void
145  {
146  $this->changes_to_active[] = [
147  'slot' => $slot,
148  'active' => true
149  ];
150  }
151 
152  public function deactivateVocabulary(SlotIdentifier $slot): void
153  {
154  $this->changes_to_active[] = [
155  'slot' => $slot,
156  'active' => false
157  ];
158  }
159  };
160  }
+ Here is the caller graph for this function:

◆ getVocabulary()

ILIAS\MetaData\Vocabularies\Dispatch\ActionsTest::getVocabulary ( Type  $type,
string  $id,
SlotIdentifier  $slot = SlotIdentifier::NULL 
)

Definition at line 39 of file ActionsTest.php.

References $id, ILIAS\__construct(), and ILIAS\GlobalScreen\Provider\id().

Referenced by ILIAS\MetaData\Vocabularies\Dispatch\ActionsTest\testActivateControlledString(), ILIAS\MetaData\Vocabularies\Dispatch\ActionsTest\testActivateControlledVocabValue(), ILIAS\MetaData\Vocabularies\Dispatch\ActionsTest\testActivateCopyright(), ILIAS\MetaData\Vocabularies\Dispatch\ActionsTest\testActivateStandard(), ILIAS\MetaData\Vocabularies\Dispatch\ActionsTest\testAllowCustomInputControlledString(), ILIAS\MetaData\Vocabularies\Dispatch\ActionsTest\testAllowCustomInputControlledVocabValue(), ILIAS\MetaData\Vocabularies\Dispatch\ActionsTest\testAllowCustomInputCopyright(), ILIAS\MetaData\Vocabularies\Dispatch\ActionsTest\testAllowCustomInputNotApplicableException(), ILIAS\MetaData\Vocabularies\Dispatch\ActionsTest\testAllowCustomInputStandard(), ILIAS\MetaData\Vocabularies\Dispatch\ActionsTest\testDeactivateControlledString(), ILIAS\MetaData\Vocabularies\Dispatch\ActionsTest\testDeactivateControlledVocabValue(), ILIAS\MetaData\Vocabularies\Dispatch\ActionsTest\testDeactivateCopyright(), ILIAS\MetaData\Vocabularies\Dispatch\ActionsTest\testDeactivateNotDeactivatableException(), ILIAS\MetaData\Vocabularies\Dispatch\ActionsTest\testDeactivateStandard(), ILIAS\MetaData\Vocabularies\Dispatch\ActionsTest\testDeleteCannotBeDeletedException(), ILIAS\MetaData\Vocabularies\Dispatch\ActionsTest\testDeleteControlledString(), ILIAS\MetaData\Vocabularies\Dispatch\ActionsTest\testDeleteControlledVocabValue(), ILIAS\MetaData\Vocabularies\Dispatch\ActionsTest\testDeleteCopyright(), ILIAS\MetaData\Vocabularies\Dispatch\ActionsTest\testDeleteStandard(), ILIAS\MetaData\Vocabularies\Dispatch\ActionsTest\testDisallowCustomInputCannotDisallowException(), ILIAS\MetaData\Vocabularies\Dispatch\ActionsTest\testDisallowCustomInputControlledString(), ILIAS\MetaData\Vocabularies\Dispatch\ActionsTest\testDisallowCustomInputControlledVocabValue(), ILIAS\MetaData\Vocabularies\Dispatch\ActionsTest\testDisallowCustomInputCopyright(), ILIAS\MetaData\Vocabularies\Dispatch\ActionsTest\testDisallowCustomInputNotApplicableException(), and ILIAS\MetaData\Vocabularies\Dispatch\ActionsTest\testDisallowCustomInputStandard().

43  : VocabularyInterface {
44  return new class ($type, $id, $slot) extends NullVocabulary {
45  public function __construct(
46  protected Type $type,
47  protected string $id,
48  protected SlotIdentifier $slot
49  ) {
50  }
51 
52  public function type(): Type
53  {
54  return $this->type;
55  }
56 
57  public function id(): string
58  {
59  return $this->id;
60  }
61 
62  public function slot(): SlotIdentifier
63  {
64  return $this->slot;
65  }
66  };
67  }
__construct()
Constructor setup ILIAS global object public.
Definition: class.ilias.php:76
$id
plugin.php for ilComponentBuildPluginInfoObjectiveTest::testAddPlugins
Definition: plugin.php:23
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ testActivateControlledString()

ILIAS\MetaData\Vocabularies\Dispatch\ActionsTest::testActivateControlledString ( )

Definition at line 181 of file ActionsTest.php.

References $vocab, ILIAS\MetaData\Vocabularies\Dispatch\ActionsTest\getControlledRepo(), ILIAS\MetaData\Vocabularies\Dispatch\ActionsTest\getInfos(), ILIAS\MetaData\Vocabularies\Dispatch\ActionsTest\getStandardRepo(), and ILIAS\MetaData\Vocabularies\Dispatch\ActionsTest\getVocabulary().

181  : void
182  {
183  $actions = new Actions(
184  $this->getInfos(true, true, true, true),
185  $controlled_repo = $this->getControlledRepo(),
186  $standard_repo = $this->getStandardRepo(),
187  );
188  $vocab = $this->getVocabulary(Type::CONTROLLED_STRING, 'vocab id', SlotIdentifier::LIFECYCLE_STATUS);
189 
190  $actions->activate($vocab);
191 
192  $this->assertEmpty($standard_repo->changes_to_active);
193  $this->assertSame(
194  [['id' => 'vocab id', 'active' => true]],
195  $controlled_repo->changes_to_active
196  );
197  $this->assertEmpty($controlled_repo->changes_to_custom_input);
198  }
getVocabulary(Type $type, string $id, SlotIdentifier $slot=SlotIdentifier::NULL)
Definition: ActionsTest.php:39
$vocab
getInfos(bool $is_deactivatable=true, bool $can_disallow_custom_input=true, bool $is_custom_input_applicable=true, bool $can_be_deleted=true)
Definition: ActionsTest.php:69
+ Here is the call graph for this function:

◆ testActivateControlledVocabValue()

ILIAS\MetaData\Vocabularies\Dispatch\ActionsTest::testActivateControlledVocabValue ( )

Definition at line 200 of file ActionsTest.php.

References $vocab, ILIAS\MetaData\Vocabularies\Dispatch\ActionsTest\getControlledRepo(), ILIAS\MetaData\Vocabularies\Dispatch\ActionsTest\getInfos(), ILIAS\MetaData\Vocabularies\Dispatch\ActionsTest\getStandardRepo(), and ILIAS\MetaData\Vocabularies\Dispatch\ActionsTest\getVocabulary().

200  : void
201  {
202  $actions = new Actions(
203  $this->getInfos(true, false, false, true),
204  $controlled_repo = $this->getControlledRepo(),
205  $standard_repo = $this->getStandardRepo(),
206  );
207  $vocab = $this->getVocabulary(Type::CONTROLLED_VOCAB_VALUE, 'vocab id', SlotIdentifier::LIFECYCLE_STATUS);
208 
209  $actions->activate($vocab);
210 
211  $this->assertEmpty($standard_repo->changes_to_active);
212  $this->assertSame(
213  [['id' => 'vocab id', 'active' => true]],
214  $controlled_repo->changes_to_active
215  );
216  $this->assertEmpty($controlled_repo->changes_to_custom_input);
217  }
getVocabulary(Type $type, string $id, SlotIdentifier $slot=SlotIdentifier::NULL)
Definition: ActionsTest.php:39
$vocab
getInfos(bool $is_deactivatable=true, bool $can_disallow_custom_input=true, bool $is_custom_input_applicable=true, bool $can_be_deleted=true)
Definition: ActionsTest.php:69
+ Here is the call graph for this function:

◆ testActivateCopyright()

ILIAS\MetaData\Vocabularies\Dispatch\ActionsTest::testActivateCopyright ( )

Definition at line 219 of file ActionsTest.php.

References $vocab, ILIAS\MetaData\Vocabularies\COPYRIGHT, ILIAS\MetaData\Vocabularies\Dispatch\ActionsTest\getControlledRepo(), ILIAS\MetaData\Vocabularies\Dispatch\ActionsTest\getInfos(), ILIAS\MetaData\Vocabularies\Dispatch\ActionsTest\getStandardRepo(), and ILIAS\MetaData\Vocabularies\Dispatch\ActionsTest\getVocabulary().

219  : void
220  {
221  $actions = new Actions(
222  $this->getInfos(false, false, true, true),
223  $controlled_repo = $this->getControlledRepo(),
224  $standard_repo = $this->getStandardRepo(),
225  );
226  $vocab = $this->getVocabulary(Type::COPYRIGHT, 'vocab id', SlotIdentifier::LIFECYCLE_STATUS);
227 
228  $actions->activate($vocab);
229 
230  $this->assertEmpty($standard_repo->changes_to_active);
231  $this->assertEmpty($controlled_repo->changes_to_active);
232  $this->assertEmpty($controlled_repo->changes_to_custom_input);
233  }
getVocabulary(Type $type, string $id, SlotIdentifier $slot=SlotIdentifier::NULL)
Definition: ActionsTest.php:39
$vocab
getInfos(bool $is_deactivatable=true, bool $can_disallow_custom_input=true, bool $is_custom_input_applicable=true, bool $can_be_deleted=true)
Definition: ActionsTest.php:69
+ Here is the call graph for this function:

◆ testActivateStandard()

ILIAS\MetaData\Vocabularies\Dispatch\ActionsTest::testActivateStandard ( )

Definition at line 162 of file ActionsTest.php.

References $vocab, ILIAS\MetaData\Vocabularies\Dispatch\ActionsTest\getControlledRepo(), ILIAS\MetaData\Vocabularies\Dispatch\ActionsTest\getInfos(), ILIAS\MetaData\Vocabularies\Dispatch\ActionsTest\getStandardRepo(), and ILIAS\MetaData\Vocabularies\Dispatch\ActionsTest\getVocabulary().

162  : void
163  {
164  $actions = new Actions(
165  $this->getInfos(true, false, false, true),
166  $controlled_repo = $this->getControlledRepo(),
167  $standard_repo = $this->getStandardRepo(),
168  );
169  $vocab = $this->getVocabulary(Type::STANDARD, '', SlotIdentifier::LIFECYCLE_STATUS);
170 
171  $actions->activate($vocab);
172 
173  $this->assertSame(
174  [['slot' => SlotIdentifier::LIFECYCLE_STATUS, 'active' => true]],
175  $standard_repo->changes_to_active
176  );
177  $this->assertEmpty($controlled_repo->changes_to_active);
178  $this->assertEmpty($controlled_repo->changes_to_custom_input);
179  }
getVocabulary(Type $type, string $id, SlotIdentifier $slot=SlotIdentifier::NULL)
Definition: ActionsTest.php:39
$vocab
getInfos(bool $is_deactivatable=true, bool $can_disallow_custom_input=true, bool $is_custom_input_applicable=true, bool $can_be_deleted=true)
Definition: ActionsTest.php:69
+ Here is the call graph for this function:

◆ testAllowCustomInputControlledString()

ILIAS\MetaData\Vocabularies\Dispatch\ActionsTest::testAllowCustomInputControlledString ( )

Definition at line 350 of file ActionsTest.php.

References $vocab, ILIAS\MetaData\Vocabularies\Dispatch\ActionsTest\getControlledRepo(), ILIAS\MetaData\Vocabularies\Dispatch\ActionsTest\getInfos(), ILIAS\MetaData\Vocabularies\Dispatch\ActionsTest\getStandardRepo(), and ILIAS\MetaData\Vocabularies\Dispatch\ActionsTest\getVocabulary().

350  : void
351  {
352  $actions = new Actions(
353  $this->getInfos(true, true, true, true),
354  $controlled_repo = $this->getControlledRepo(),
355  $standard_repo = $this->getStandardRepo(),
356  );
357  $vocab = $this->getVocabulary(Type::CONTROLLED_STRING, 'vocab id', SlotIdentifier::LIFECYCLE_STATUS);
358 
359  $actions->allowCustomInput($vocab);
360 
361  $this->assertEmpty($standard_repo->changes_to_active);
362  $this->assertEmpty($controlled_repo->changes_to_active);
363  $this->assertSame(
364  [['id' => 'vocab id', 'custom_inputs' => true]],
365  $controlled_repo->changes_to_custom_input
366  );
367  }
getVocabulary(Type $type, string $id, SlotIdentifier $slot=SlotIdentifier::NULL)
Definition: ActionsTest.php:39
$vocab
getInfos(bool $is_deactivatable=true, bool $can_disallow_custom_input=true, bool $is_custom_input_applicable=true, bool $can_be_deleted=true)
Definition: ActionsTest.php:69
+ Here is the call graph for this function:

◆ testAllowCustomInputControlledVocabValue()

ILIAS\MetaData\Vocabularies\Dispatch\ActionsTest::testAllowCustomInputControlledVocabValue ( )

Definition at line 369 of file ActionsTest.php.

References $vocab, ILIAS\MetaData\Vocabularies\Dispatch\ActionsTest\getControlledRepo(), ILIAS\MetaData\Vocabularies\Dispatch\ActionsTest\getInfos(), ILIAS\MetaData\Vocabularies\Dispatch\ActionsTest\getStandardRepo(), and ILIAS\MetaData\Vocabularies\Dispatch\ActionsTest\getVocabulary().

369  : void
370  {
371  $actions = new Actions(
372  $this->getInfos(true, false, true, true),
373  $controlled_repo = $this->getControlledRepo(),
374  $standard_repo = $this->getStandardRepo(),
375  );
376  $vocab = $this->getVocabulary(Type::CONTROLLED_VOCAB_VALUE, 'vocab id', SlotIdentifier::LIFECYCLE_STATUS);
377 
378  $actions->allowCustomInput($vocab);
379 
380  $this->assertEmpty($standard_repo->changes_to_active);
381  $this->assertEmpty($controlled_repo->changes_to_active);
382  $this->assertEmpty($controlled_repo->changes_to_custom_input);
383  }
getVocabulary(Type $type, string $id, SlotIdentifier $slot=SlotIdentifier::NULL)
Definition: ActionsTest.php:39
$vocab
getInfos(bool $is_deactivatable=true, bool $can_disallow_custom_input=true, bool $is_custom_input_applicable=true, bool $can_be_deleted=true)
Definition: ActionsTest.php:69
+ Here is the call graph for this function:

◆ testAllowCustomInputCopyright()

ILIAS\MetaData\Vocabularies\Dispatch\ActionsTest::testAllowCustomInputCopyright ( )

Definition at line 385 of file ActionsTest.php.

References $vocab, ILIAS\MetaData\Vocabularies\COPYRIGHT, ILIAS\MetaData\Vocabularies\Dispatch\ActionsTest\getControlledRepo(), ILIAS\MetaData\Vocabularies\Dispatch\ActionsTest\getInfos(), ILIAS\MetaData\Vocabularies\Dispatch\ActionsTest\getStandardRepo(), and ILIAS\MetaData\Vocabularies\Dispatch\ActionsTest\getVocabulary().

385  : void
386  {
387  $actions = new Actions(
388  $this->getInfos(false, false, true, true),
389  $controlled_repo = $this->getControlledRepo(),
390  $standard_repo = $this->getStandardRepo(),
391  );
392  $vocab = $this->getVocabulary(Type::COPYRIGHT, 'vocab id', SlotIdentifier::LIFECYCLE_STATUS);
393 
394  $actions->allowCustomInput($vocab);
395 
396  $this->assertEmpty($standard_repo->changes_to_active);
397  $this->assertEmpty($controlled_repo->changes_to_active);
398  $this->assertEmpty($controlled_repo->changes_to_custom_input);
399  }
getVocabulary(Type $type, string $id, SlotIdentifier $slot=SlotIdentifier::NULL)
Definition: ActionsTest.php:39
$vocab
getInfos(bool $is_deactivatable=true, bool $can_disallow_custom_input=true, bool $is_custom_input_applicable=true, bool $can_be_deleted=true)
Definition: ActionsTest.php:69
+ Here is the call graph for this function:

◆ testAllowCustomInputNotApplicableException()

ILIAS\MetaData\Vocabularies\Dispatch\ActionsTest::testAllowCustomInputNotApplicableException ( )

Definition at line 321 of file ActionsTest.php.

References $vocab, ILIAS\MetaData\Vocabularies\Dispatch\ActionsTest\getControlledRepo(), ILIAS\MetaData\Vocabularies\Dispatch\ActionsTest\getInfos(), ILIAS\MetaData\Vocabularies\Dispatch\ActionsTest\getStandardRepo(), and ILIAS\MetaData\Vocabularies\Dispatch\ActionsTest\getVocabulary().

321  : void
322  {
323  $actions = new Actions(
324  $this->getInfos(true, false, false, true),
325  $controlled_repo = $this->getControlledRepo(),
326  $standard_repo = $this->getStandardRepo(),
327  );
328  $vocab = $this->getVocabulary(Type::STANDARD, '', SlotIdentifier::LIFECYCLE_STATUS);
329 
330  $this->expectException(\ilMDVocabulariesException::class);
331  $actions->allowCustomInput($vocab);
332  }
getVocabulary(Type $type, string $id, SlotIdentifier $slot=SlotIdentifier::NULL)
Definition: ActionsTest.php:39
$vocab
getInfos(bool $is_deactivatable=true, bool $can_disallow_custom_input=true, bool $is_custom_input_applicable=true, bool $can_be_deleted=true)
Definition: ActionsTest.php:69
+ Here is the call graph for this function:

◆ testAllowCustomInputStandard()

ILIAS\MetaData\Vocabularies\Dispatch\ActionsTest::testAllowCustomInputStandard ( )

Definition at line 334 of file ActionsTest.php.

References $vocab, ILIAS\MetaData\Vocabularies\Dispatch\ActionsTest\getControlledRepo(), ILIAS\MetaData\Vocabularies\Dispatch\ActionsTest\getInfos(), ILIAS\MetaData\Vocabularies\Dispatch\ActionsTest\getStandardRepo(), and ILIAS\MetaData\Vocabularies\Dispatch\ActionsTest\getVocabulary().

334  : void
335  {
336  $actions = new Actions(
337  $this->getInfos(true, false, true, true),
338  $controlled_repo = $this->getControlledRepo(),
339  $standard_repo = $this->getStandardRepo(),
340  );
341  $vocab = $this->getVocabulary(Type::STANDARD, '', SlotIdentifier::LIFECYCLE_STATUS);
342 
343  $actions->allowCustomInput($vocab);
344 
345  $this->assertEmpty($standard_repo->changes_to_active);
346  $this->assertEmpty($controlled_repo->changes_to_active);
347  $this->assertEmpty($controlled_repo->changes_to_custom_input);
348  }
getVocabulary(Type $type, string $id, SlotIdentifier $slot=SlotIdentifier::NULL)
Definition: ActionsTest.php:39
$vocab
getInfos(bool $is_deactivatable=true, bool $can_disallow_custom_input=true, bool $is_custom_input_applicable=true, bool $can_be_deleted=true)
Definition: ActionsTest.php:69
+ Here is the call graph for this function:

◆ testDeactivateControlledString()

ILIAS\MetaData\Vocabularies\Dispatch\ActionsTest::testDeactivateControlledString ( )

Definition at line 267 of file ActionsTest.php.

References $vocab, ILIAS\MetaData\Vocabularies\Dispatch\ActionsTest\getControlledRepo(), ILIAS\MetaData\Vocabularies\Dispatch\ActionsTest\getInfos(), ILIAS\MetaData\Vocabularies\Dispatch\ActionsTest\getStandardRepo(), and ILIAS\MetaData\Vocabularies\Dispatch\ActionsTest\getVocabulary().

267  : void
268  {
269  $actions = new Actions(
270  $this->getInfos(true, true, true, true),
271  $controlled_repo = $this->getControlledRepo(),
272  $standard_repo = $this->getStandardRepo(),
273  );
274  $vocab = $this->getVocabulary(Type::CONTROLLED_STRING, 'vocab id', SlotIdentifier::LIFECYCLE_STATUS);
275 
276  $actions->deactivate($vocab);
277 
278  $this->assertEmpty($standard_repo->changes_to_active);
279  $this->assertSame(
280  [['id' => 'vocab id', 'active' => false]],
281  $controlled_repo->changes_to_active
282  );
283  $this->assertEmpty($controlled_repo->changes_to_custom_input);
284  }
getVocabulary(Type $type, string $id, SlotIdentifier $slot=SlotIdentifier::NULL)
Definition: ActionsTest.php:39
$vocab
getInfos(bool $is_deactivatable=true, bool $can_disallow_custom_input=true, bool $is_custom_input_applicable=true, bool $can_be_deleted=true)
Definition: ActionsTest.php:69
+ Here is the call graph for this function:

◆ testDeactivateControlledVocabValue()

ILIAS\MetaData\Vocabularies\Dispatch\ActionsTest::testDeactivateControlledVocabValue ( )

Definition at line 286 of file ActionsTest.php.

References $vocab, ILIAS\MetaData\Vocabularies\Dispatch\ActionsTest\getControlledRepo(), ILIAS\MetaData\Vocabularies\Dispatch\ActionsTest\getInfos(), ILIAS\MetaData\Vocabularies\Dispatch\ActionsTest\getStandardRepo(), and ILIAS\MetaData\Vocabularies\Dispatch\ActionsTest\getVocabulary().

286  : void
287  {
288  $actions = new Actions(
289  $this->getInfos(true, false, false, true),
290  $controlled_repo = $this->getControlledRepo(),
291  $standard_repo = $this->getStandardRepo(),
292  );
293  $vocab = $this->getVocabulary(Type::CONTROLLED_VOCAB_VALUE, 'vocab id', SlotIdentifier::LIFECYCLE_STATUS);
294 
295  $actions->deactivate($vocab);
296 
297  $this->assertEmpty($standard_repo->changes_to_active);
298  $this->assertSame(
299  [['id' => 'vocab id', 'active' => false]],
300  $controlled_repo->changes_to_active
301  );
302  $this->assertEmpty($controlled_repo->changes_to_custom_input);
303  }
getVocabulary(Type $type, string $id, SlotIdentifier $slot=SlotIdentifier::NULL)
Definition: ActionsTest.php:39
$vocab
getInfos(bool $is_deactivatable=true, bool $can_disallow_custom_input=true, bool $is_custom_input_applicable=true, bool $can_be_deleted=true)
Definition: ActionsTest.php:69
+ Here is the call graph for this function:

◆ testDeactivateCopyright()

ILIAS\MetaData\Vocabularies\Dispatch\ActionsTest::testDeactivateCopyright ( )

Definition at line 305 of file ActionsTest.php.

References $vocab, ILIAS\MetaData\Vocabularies\COPYRIGHT, ILIAS\MetaData\Vocabularies\Dispatch\ActionsTest\getControlledRepo(), ILIAS\MetaData\Vocabularies\Dispatch\ActionsTest\getInfos(), ILIAS\MetaData\Vocabularies\Dispatch\ActionsTest\getStandardRepo(), and ILIAS\MetaData\Vocabularies\Dispatch\ActionsTest\getVocabulary().

305  : void
306  {
307  $actions = new Actions(
308  $this->getInfos(true, false, true, true),
309  $controlled_repo = $this->getControlledRepo(),
310  $standard_repo = $this->getStandardRepo(),
311  );
312  $vocab = $this->getVocabulary(Type::COPYRIGHT, 'vocab id', SlotIdentifier::LIFECYCLE_STATUS);
313 
314  $actions->deactivate($vocab);
315 
316  $this->assertEmpty($standard_repo->changes_to_active);
317  $this->assertEmpty($controlled_repo->changes_to_active);
318  $this->assertEmpty($controlled_repo->changes_to_custom_input);
319  }
getVocabulary(Type $type, string $id, SlotIdentifier $slot=SlotIdentifier::NULL)
Definition: ActionsTest.php:39
$vocab
getInfos(bool $is_deactivatable=true, bool $can_disallow_custom_input=true, bool $is_custom_input_applicable=true, bool $can_be_deleted=true)
Definition: ActionsTest.php:69
+ Here is the call graph for this function:

◆ testDeactivateNotDeactivatableException()

ILIAS\MetaData\Vocabularies\Dispatch\ActionsTest::testDeactivateNotDeactivatableException ( )

Definition at line 235 of file ActionsTest.php.

References $vocab, ILIAS\MetaData\Vocabularies\Dispatch\ActionsTest\getControlledRepo(), ILIAS\MetaData\Vocabularies\Dispatch\ActionsTest\getInfos(), ILIAS\MetaData\Vocabularies\Dispatch\ActionsTest\getStandardRepo(), and ILIAS\MetaData\Vocabularies\Dispatch\ActionsTest\getVocabulary().

235  : void
236  {
237  $actions = new Actions(
238  $this->getInfos(false, false, false, true),
239  $controlled_repo = $this->getControlledRepo(),
240  $standard_repo = $this->getStandardRepo(),
241  );
242  $vocab = $this->getVocabulary(Type::STANDARD, '', SlotIdentifier::LIFECYCLE_STATUS);
243 
244  $this->expectException(\ilMDVocabulariesException::class);
245  $actions->deactivate($vocab);
246  }
getVocabulary(Type $type, string $id, SlotIdentifier $slot=SlotIdentifier::NULL)
Definition: ActionsTest.php:39
$vocab
getInfos(bool $is_deactivatable=true, bool $can_disallow_custom_input=true, bool $is_custom_input_applicable=true, bool $can_be_deleted=true)
Definition: ActionsTest.php:69
+ Here is the call graph for this function:

◆ testDeactivateStandard()

ILIAS\MetaData\Vocabularies\Dispatch\ActionsTest::testDeactivateStandard ( )

Definition at line 248 of file ActionsTest.php.

References $vocab, ILIAS\MetaData\Vocabularies\Dispatch\ActionsTest\getControlledRepo(), ILIAS\MetaData\Vocabularies\Dispatch\ActionsTest\getInfos(), ILIAS\MetaData\Vocabularies\Dispatch\ActionsTest\getStandardRepo(), and ILIAS\MetaData\Vocabularies\Dispatch\ActionsTest\getVocabulary().

248  : void
249  {
250  $actions = new Actions(
251  $this->getInfos(true, false, false, true),
252  $controlled_repo = $this->getControlledRepo(),
253  $standard_repo = $this->getStandardRepo(),
254  );
255  $vocab = $this->getVocabulary(Type::STANDARD, '', SlotIdentifier::LIFECYCLE_STATUS);
256 
257  $actions->deactivate($vocab);
258 
259  $this->assertSame(
260  [['slot' => SlotIdentifier::LIFECYCLE_STATUS, 'active' => false]],
261  $standard_repo->changes_to_active
262  );
263  $this->assertEmpty($controlled_repo->changes_to_active);
264  $this->assertEmpty($controlled_repo->changes_to_custom_input);
265  }
getVocabulary(Type $type, string $id, SlotIdentifier $slot=SlotIdentifier::NULL)
Definition: ActionsTest.php:39
$vocab
getInfos(bool $is_deactivatable=true, bool $can_disallow_custom_input=true, bool $is_custom_input_applicable=true, bool $can_be_deleted=true)
Definition: ActionsTest.php:69
+ Here is the call graph for this function:

◆ testDeleteCannotBeDeletedException()

ILIAS\MetaData\Vocabularies\Dispatch\ActionsTest::testDeleteCannotBeDeletedException ( )

Definition at line 494 of file ActionsTest.php.

References ILIAS\MetaData\Vocabularies\Dispatch\ActionsTest\getControlledRepo(), ILIAS\MetaData\Vocabularies\Dispatch\ActionsTest\getInfos(), ILIAS\MetaData\Vocabularies\Dispatch\ActionsTest\getStandardRepo(), and ILIAS\MetaData\Vocabularies\Dispatch\ActionsTest\getVocabulary().

494  : void
495  {
496  $actions = new Actions(
497  $this->getInfos(false, true, true, false),
498  $controlled_repo = $this->getControlledRepo(),
499  $standard_repo = $this->getStandardRepo(),
500  );
501 
502  $this->expectException(\ilMDVocabulariesException::class);
503  $actions->delete($this->getVocabulary(Type::STANDARD, 'some id'));
504  }
getVocabulary(Type $type, string $id, SlotIdentifier $slot=SlotIdentifier::NULL)
Definition: ActionsTest.php:39
getInfos(bool $is_deactivatable=true, bool $can_disallow_custom_input=true, bool $is_custom_input_applicable=true, bool $can_be_deleted=true)
Definition: ActionsTest.php:69
+ Here is the call graph for this function:

◆ testDeleteControlledString()

ILIAS\MetaData\Vocabularies\Dispatch\ActionsTest::testDeleteControlledString ( )

Definition at line 519 of file ActionsTest.php.

References ILIAS\MetaData\Vocabularies\Dispatch\ActionsTest\getControlledRepo(), ILIAS\MetaData\Vocabularies\Dispatch\ActionsTest\getInfos(), ILIAS\MetaData\Vocabularies\Dispatch\ActionsTest\getStandardRepo(), and ILIAS\MetaData\Vocabularies\Dispatch\ActionsTest\getVocabulary().

519  : void
520  {
521  $actions = new Actions(
522  $this->getInfos(true, true, true, true),
523  $controlled_repo = $this->getControlledRepo(),
524  $standard_repo = $this->getStandardRepo(),
525  );
526 
527  $actions->delete($this->getVocabulary(Type::CONTROLLED_STRING, 'some id'));
528 
529  $this->assertSame(
530  ['some id'],
531  $controlled_repo->exposed_deletions
532  );
533  }
getVocabulary(Type $type, string $id, SlotIdentifier $slot=SlotIdentifier::NULL)
Definition: ActionsTest.php:39
getInfos(bool $is_deactivatable=true, bool $can_disallow_custom_input=true, bool $is_custom_input_applicable=true, bool $can_be_deleted=true)
Definition: ActionsTest.php:69
+ Here is the call graph for this function:

◆ testDeleteControlledVocabValue()

ILIAS\MetaData\Vocabularies\Dispatch\ActionsTest::testDeleteControlledVocabValue ( )

Definition at line 535 of file ActionsTest.php.

References ILIAS\MetaData\Vocabularies\Dispatch\ActionsTest\getControlledRepo(), ILIAS\MetaData\Vocabularies\Dispatch\ActionsTest\getInfos(), ILIAS\MetaData\Vocabularies\Dispatch\ActionsTest\getStandardRepo(), and ILIAS\MetaData\Vocabularies\Dispatch\ActionsTest\getVocabulary().

535  : void
536  {
537  $actions = new Actions(
538  $this->getInfos(true, true, true, true),
539  $controlled_repo = $this->getControlledRepo(),
540  $standard_repo = $this->getStandardRepo(),
541  );
542 
543  $actions->delete($this->getVocabulary(Type::CONTROLLED_VOCAB_VALUE, 'some id'));
544 
545  $this->assertSame(
546  ['some id'],
547  $controlled_repo->exposed_deletions
548  );
549  }
getVocabulary(Type $type, string $id, SlotIdentifier $slot=SlotIdentifier::NULL)
Definition: ActionsTest.php:39
getInfos(bool $is_deactivatable=true, bool $can_disallow_custom_input=true, bool $is_custom_input_applicable=true, bool $can_be_deleted=true)
Definition: ActionsTest.php:69
+ Here is the call graph for this function:

◆ testDeleteCopyright()

ILIAS\MetaData\Vocabularies\Dispatch\ActionsTest::testDeleteCopyright ( )

Definition at line 551 of file ActionsTest.php.

References ILIAS\MetaData\Vocabularies\COPYRIGHT, ILIAS\MetaData\Vocabularies\Dispatch\ActionsTest\getControlledRepo(), ILIAS\MetaData\Vocabularies\Dispatch\ActionsTest\getInfos(), ILIAS\MetaData\Vocabularies\Dispatch\ActionsTest\getStandardRepo(), and ILIAS\MetaData\Vocabularies\Dispatch\ActionsTest\getVocabulary().

551  : void
552  {
553  $actions = new Actions(
554  $this->getInfos(true, true, true, true),
555  $controlled_repo = $this->getControlledRepo(),
556  $standard_repo = $this->getStandardRepo(),
557  );
558 
559  $actions->delete($this->getVocabulary(Type::COPYRIGHT, 'some id'));
560 
561  $this->assertEmpty($controlled_repo->exposed_deletions);
562  }
getVocabulary(Type $type, string $id, SlotIdentifier $slot=SlotIdentifier::NULL)
Definition: ActionsTest.php:39
getInfos(bool $is_deactivatable=true, bool $can_disallow_custom_input=true, bool $is_custom_input_applicable=true, bool $can_be_deleted=true)
Definition: ActionsTest.php:69
+ Here is the call graph for this function:

◆ testDeleteStandard()

ILIAS\MetaData\Vocabularies\Dispatch\ActionsTest::testDeleteStandard ( )

Definition at line 506 of file ActionsTest.php.

References ILIAS\MetaData\Vocabularies\Dispatch\ActionsTest\getControlledRepo(), ILIAS\MetaData\Vocabularies\Dispatch\ActionsTest\getInfos(), ILIAS\MetaData\Vocabularies\Dispatch\ActionsTest\getStandardRepo(), and ILIAS\MetaData\Vocabularies\Dispatch\ActionsTest\getVocabulary().

506  : void
507  {
508  $actions = new Actions(
509  $this->getInfos(false, true, true, true),
510  $controlled_repo = $this->getControlledRepo(),
511  $standard_repo = $this->getStandardRepo(),
512  );
513 
514  $actions->delete($this->getVocabulary(Type::STANDARD, 'some id'));
515 
516  $this->assertEmpty($controlled_repo->exposed_deletions);
517  }
getVocabulary(Type $type, string $id, SlotIdentifier $slot=SlotIdentifier::NULL)
Definition: ActionsTest.php:39
getInfos(bool $is_deactivatable=true, bool $can_disallow_custom_input=true, bool $is_custom_input_applicable=true, bool $can_be_deleted=true)
Definition: ActionsTest.php:69
+ Here is the call graph for this function:

◆ testDisallowCustomInputCannotDisallowException()

ILIAS\MetaData\Vocabularies\Dispatch\ActionsTest::testDisallowCustomInputCannotDisallowException ( )

Definition at line 414 of file ActionsTest.php.

References $vocab, ILIAS\MetaData\Vocabularies\Dispatch\ActionsTest\getControlledRepo(), ILIAS\MetaData\Vocabularies\Dispatch\ActionsTest\getInfos(), ILIAS\MetaData\Vocabularies\Dispatch\ActionsTest\getStandardRepo(), and ILIAS\MetaData\Vocabularies\Dispatch\ActionsTest\getVocabulary().

414  : void
415  {
416  $actions = new Actions(
417  $this->getInfos(true, false, true, true),
418  $controlled_repo = $this->getControlledRepo(),
419  $standard_repo = $this->getStandardRepo(),
420  );
421  $vocab = $this->getVocabulary(Type::STANDARD, '', SlotIdentifier::LIFECYCLE_STATUS);
422 
423  $this->expectException(\ilMDVocabulariesException::class);
424  $actions->disallowCustomInput($vocab);
425  }
getVocabulary(Type $type, string $id, SlotIdentifier $slot=SlotIdentifier::NULL)
Definition: ActionsTest.php:39
$vocab
getInfos(bool $is_deactivatable=true, bool $can_disallow_custom_input=true, bool $is_custom_input_applicable=true, bool $can_be_deleted=true)
Definition: ActionsTest.php:69
+ Here is the call graph for this function:

◆ testDisallowCustomInputControlledString()

ILIAS\MetaData\Vocabularies\Dispatch\ActionsTest::testDisallowCustomInputControlledString ( )

Definition at line 443 of file ActionsTest.php.

References $vocab, ILIAS\MetaData\Vocabularies\Dispatch\ActionsTest\getControlledRepo(), ILIAS\MetaData\Vocabularies\Dispatch\ActionsTest\getInfos(), ILIAS\MetaData\Vocabularies\Dispatch\ActionsTest\getStandardRepo(), and ILIAS\MetaData\Vocabularies\Dispatch\ActionsTest\getVocabulary().

443  : void
444  {
445  $actions = new Actions(
446  $this->getInfos(true, true, true, true),
447  $controlled_repo = $this->getControlledRepo(),
448  $standard_repo = $this->getStandardRepo(),
449  );
450  $vocab = $this->getVocabulary(Type::CONTROLLED_STRING, 'vocab id', SlotIdentifier::LIFECYCLE_STATUS);
451 
452  $actions->disallowCustomInput($vocab);
453 
454  $this->assertEmpty($standard_repo->changes_to_active);
455  $this->assertEmpty($controlled_repo->changes_to_active);
456  $this->assertSame(
457  [['id' => 'vocab id', 'custom_inputs' => false]],
458  $controlled_repo->changes_to_custom_input
459  );
460  }
getVocabulary(Type $type, string $id, SlotIdentifier $slot=SlotIdentifier::NULL)
Definition: ActionsTest.php:39
$vocab
getInfos(bool $is_deactivatable=true, bool $can_disallow_custom_input=true, bool $is_custom_input_applicable=true, bool $can_be_deleted=true)
Definition: ActionsTest.php:69
+ Here is the call graph for this function:

◆ testDisallowCustomInputControlledVocabValue()

ILIAS\MetaData\Vocabularies\Dispatch\ActionsTest::testDisallowCustomInputControlledVocabValue ( )

Definition at line 462 of file ActionsTest.php.

References $vocab, ILIAS\MetaData\Vocabularies\Dispatch\ActionsTest\getControlledRepo(), ILIAS\MetaData\Vocabularies\Dispatch\ActionsTest\getInfos(), ILIAS\MetaData\Vocabularies\Dispatch\ActionsTest\getStandardRepo(), and ILIAS\MetaData\Vocabularies\Dispatch\ActionsTest\getVocabulary().

462  : void
463  {
464  $actions = new Actions(
465  $this->getInfos(true, true, true, true),
466  $controlled_repo = $this->getControlledRepo(),
467  $standard_repo = $this->getStandardRepo(),
468  );
469  $vocab = $this->getVocabulary(Type::CONTROLLED_VOCAB_VALUE, 'vocab id', SlotIdentifier::LIFECYCLE_STATUS);
470 
471  $actions->disallowCustomInput($vocab);
472 
473  $this->assertEmpty($standard_repo->changes_to_active);
474  $this->assertEmpty($controlled_repo->changes_to_active);
475  $this->assertEmpty($controlled_repo->changes_to_custom_input);
476  }
getVocabulary(Type $type, string $id, SlotIdentifier $slot=SlotIdentifier::NULL)
Definition: ActionsTest.php:39
$vocab
getInfos(bool $is_deactivatable=true, bool $can_disallow_custom_input=true, bool $is_custom_input_applicable=true, bool $can_be_deleted=true)
Definition: ActionsTest.php:69
+ Here is the call graph for this function:

◆ testDisallowCustomInputCopyright()

ILIAS\MetaData\Vocabularies\Dispatch\ActionsTest::testDisallowCustomInputCopyright ( )

Definition at line 478 of file ActionsTest.php.

References $vocab, ILIAS\MetaData\Vocabularies\COPYRIGHT, ILIAS\MetaData\Vocabularies\Dispatch\ActionsTest\getControlledRepo(), ILIAS\MetaData\Vocabularies\Dispatch\ActionsTest\getInfos(), ILIAS\MetaData\Vocabularies\Dispatch\ActionsTest\getStandardRepo(), and ILIAS\MetaData\Vocabularies\Dispatch\ActionsTest\getVocabulary().

478  : void
479  {
480  $actions = new Actions(
481  $this->getInfos(false, true, true, true),
482  $controlled_repo = $this->getControlledRepo(),
483  $standard_repo = $this->getStandardRepo(),
484  );
485  $vocab = $this->getVocabulary(Type::COPYRIGHT, 'vocab id', SlotIdentifier::LIFECYCLE_STATUS);
486 
487  $actions->disallowCustomInput($vocab);
488 
489  $this->assertEmpty($standard_repo->changes_to_active);
490  $this->assertEmpty($controlled_repo->changes_to_active);
491  $this->assertEmpty($controlled_repo->changes_to_custom_input);
492  }
getVocabulary(Type $type, string $id, SlotIdentifier $slot=SlotIdentifier::NULL)
Definition: ActionsTest.php:39
$vocab
getInfos(bool $is_deactivatable=true, bool $can_disallow_custom_input=true, bool $is_custom_input_applicable=true, bool $can_be_deleted=true)
Definition: ActionsTest.php:69
+ Here is the call graph for this function:

◆ testDisallowCustomInputNotApplicableException()

ILIAS\MetaData\Vocabularies\Dispatch\ActionsTest::testDisallowCustomInputNotApplicableException ( )

Definition at line 401 of file ActionsTest.php.

References $vocab, ILIAS\MetaData\Vocabularies\Dispatch\ActionsTest\getControlledRepo(), ILIAS\MetaData\Vocabularies\Dispatch\ActionsTest\getInfos(), ILIAS\MetaData\Vocabularies\Dispatch\ActionsTest\getStandardRepo(), and ILIAS\MetaData\Vocabularies\Dispatch\ActionsTest\getVocabulary().

401  : void
402  {
403  $actions = new Actions(
404  $this->getInfos(true, true, false, true),
405  $controlled_repo = $this->getControlledRepo(),
406  $standard_repo = $this->getStandardRepo(),
407  );
408  $vocab = $this->getVocabulary(Type::STANDARD, '', SlotIdentifier::LIFECYCLE_STATUS);
409 
410  $this->expectException(\ilMDVocabulariesException::class);
411  $actions->disallowCustomInput($vocab);
412  }
getVocabulary(Type $type, string $id, SlotIdentifier $slot=SlotIdentifier::NULL)
Definition: ActionsTest.php:39
$vocab
getInfos(bool $is_deactivatable=true, bool $can_disallow_custom_input=true, bool $is_custom_input_applicable=true, bool $can_be_deleted=true)
Definition: ActionsTest.php:69
+ Here is the call graph for this function:

◆ testDisallowCustomInputStandard()

ILIAS\MetaData\Vocabularies\Dispatch\ActionsTest::testDisallowCustomInputStandard ( )

Definition at line 427 of file ActionsTest.php.

References $vocab, ILIAS\MetaData\Vocabularies\Dispatch\ActionsTest\getControlledRepo(), ILIAS\MetaData\Vocabularies\Dispatch\ActionsTest\getInfos(), ILIAS\MetaData\Vocabularies\Dispatch\ActionsTest\getStandardRepo(), and ILIAS\MetaData\Vocabularies\Dispatch\ActionsTest\getVocabulary().

427  : void
428  {
429  $actions = new Actions(
430  $this->getInfos(true, true, true, true),
431  $controlled_repo = $this->getControlledRepo(),
432  $standard_repo = $this->getStandardRepo(),
433  );
434  $vocab = $this->getVocabulary(Type::STANDARD, '', SlotIdentifier::LIFECYCLE_STATUS);
435 
436  $actions->disallowCustomInput($vocab);
437 
438  $this->assertEmpty($standard_repo->changes_to_active);
439  $this->assertEmpty($controlled_repo->changes_to_active);
440  $this->assertEmpty($controlled_repo->changes_to_custom_input);
441  }
getVocabulary(Type $type, string $id, SlotIdentifier $slot=SlotIdentifier::NULL)
Definition: ActionsTest.php:39
$vocab
getInfos(bool $is_deactivatable=true, bool $can_disallow_custom_input=true, bool $is_custom_input_applicable=true, bool $can_be_deleted=true)
Definition: ActionsTest.php:69
+ Here is the call graph for this function:

The documentation for this class was generated from the following file: