ILIAS  trunk Revision v12.0_alpha-1540-g00f839d5fa1
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) {
32 return $id + rand(0, 20);
33 }, [0, 0, 0]);
34 $type = "myType";
35 $component = "componentcomponent";
36 $class_name = "classclass";
37 $v = ['10', '0'];
38 $target_release = "2000.20";
39 try {
40 $target_1 = (new ilExportHandlerTarget())
41 ->withType($type)
42 ->withComponent($component)
43 ->withClassname($class_name)
44 ->withTargetRelease($target_release)
45 ->withObjectIds($object_ids);
46 self::assertEquals($type, $target_1->getType());
47 self::assertEquals($component, $target_1->getComponent());
48 self::assertEquals($class_name, $target_1->getClassname());
49 self::assertEquals($target_release, $target_1->getTargetRelease());
50 self::assertEmpty(array_diff($object_ids, $target_1->getObjectIds()));
51 } catch (Exception $exception) {
52 self::fail($exception->getMessage());
53 }
54 }
55}
$id
plugin.php for ilComponentBuildPluginInfoObjectiveTest::testAddPlugins
Definition: plugin.php:23