ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
HandlerTest.php
Go to the documentation of this file.
1<?php
2
19declare(strict_types=1);
20
22
23use Exception;
24use ILIAS\Export\ExportHandler\Target\Handler as ilExportHandlerTarget;
25use PHPUnit\Framework\TestCase;
26
27class 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