ILIAS  trunk Revision v11.0_alpha-1846-g895b5f47236
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Modules Pages
HandlerTest.php
Go to the documentation of this file.
1 <?php
2 
19 declare(strict_types=1);
20 
22 
23 use Exception;
24 use ILIAS\Export\ExportHandler\Target\Handler as ilExportHandlerTarget;
26 
27 class HandlerTest extends TestCase
28 {
29  public function testExportHandlerTarget(): void
30  {
31  $object_ids = array_map(function (string $id) {return $id + rand(0, 20); }, [0, 0, 0]);
32  $type = "myType";
33  $component = "componentcomponent";
34  $class_name = "classclass";
35  $v = ['10', '0'];
36  $target_release = "2000.20";
37  try {
38  $target_1 = (new ilExportHandlerTarget())
39  ->withType($type)
40  ->withComponent($component)
41  ->withClassname($class_name)
42  ->withTargetRelease($target_release)
43  ->withObjectIds($object_ids);
44  self::assertEquals($type, $target_1->getType());
45  self::assertEquals($component, $target_1->getComponent());
46  self::assertEquals($class_name, $target_1->getClassname());
47  self::assertEquals($target_release, $target_1->getTargetRelease());
48  self::assertEmpty(array_diff($object_ids, $target_1->getObjectIds()));
49  } catch (Exception $exception) {
50  self::fail($exception->getMessage());
51  }
52  }
53 }
$id
plugin.php for ilComponentBuildPluginInfoObjectiveTest::testAddPlugins
Definition: plugin.php:23