31 require_once(
"vendor/composer/vendor/autoload.php");
39 #[BackupGlobals(false)] 40 #[BackupStaticProperties(false)] 41 #[PreserveGlobalState(false)] 42 #[RunTestsInSeparateProcesses] 48 $integer->setValue(3);
50 $integer2->setValue(3);
52 $integer3->setValue(4);
54 $this->assertEquals($integer->getValue(), 3);
55 $this->assertTrue($integer->equals($integer2));
56 $this->assertEquals($integer->getHash(), $integer2->getHash());
57 $this->assertNotEquals($integer->getHash(), $integer3->getHash());
58 $integer3->unserialize($integer->serialize());
59 $this->assertTrue($integer->equals($integer3));
60 $this->assertTrue($integer->getType()->equals(
new SingleType(IntegerValue::class)));
66 $list->setValue([1, 2, 3]);
68 $this->assertTrue($list->getType()->equals(
new ListType(IntegerValue::class)));
72 $integer1->setValue(1);
74 $string->setValue(
"1");
75 $list2->setValue([$integer1, $string]);
77 $this->assertTrue($list2->getType()->equals(
new ListType(ScalarValue::class)));
Class BackgroundTaskTest.