ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
ILIAS\Tests\Setup\Artifact\ArrayArtifactTest Class Reference
+ Inheritance diagram for ILIAS\Tests\Setup\Artifact\ArrayArtifactTest:
+ Collaboration diagram for ILIAS\Tests\Setup\Artifact\ArrayArtifactTest:

Public Member Functions

 testSerialize ()
 
 testOnlyPrimitives ()
 

Detailed Description

Definition at line 26 of file ArrayArtifactTest.php.

Member Function Documentation

◆ testOnlyPrimitives()

ILIAS\Tests\Setup\Artifact\ArrayArtifactTest::testOnlyPrimitives ( )

Definition at line 45 of file ArrayArtifactTest.php.

45 : void
46 {
47 $this->expectException(\InvalidArgumentException::class);
48
49 $data = [ $this ];
50
51 new Artifact\ArrayArtifact($data);
52 }

References $data.

◆ testSerialize()

ILIAS\Tests\Setup\Artifact\ArrayArtifactTest::testSerialize ( )

Definition at line 28 of file ArrayArtifactTest.php.

28 : void
29 {
30 $data = [
31 "one" => 1,
32 "two" => 2,
33 "nested" => [
34 "array" => "are nice"
35 ]
36 ];
37
38 $a = new Artifact\ArrayArtifact($data);
39
40 $serialized = $a->serialize();
41
42 $this->assertEquals($data, eval("?>" . $serialized));
43 }
$a
thx to https://mlocati.github.io/php-cs-fixer-configurator for the examples

References Vendor\Package\$a, and $data.


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