21use PHPUnit\Framework\Attributes\BackupGlobals;
22use PHPUnit\Framework\Attributes\BackupStaticProperties;
23use PHPUnit\Framework\Attributes\PreserveGlobalState;
24use PHPUnit\Framework\Attributes\RunTestsInSeparateProcesses;
25use PHPUnit\Framework\Attributes\Test;
28use PHPUnit\Framework\TestCase;
30require_once
'./vendor/composer/vendor/autoload.php';
37#[BackupGlobals(false)]
38#[BackupStaticProperties(false)]
39#[PreserveGlobalState(false)]
40#[RunTestsInSeparateProcesses]
61 $this->subject->put($key, $value);
62 $result = $this->subject->toArray();
64 $this->assertArrayHasKey($key, $result);
65 $this->assertEquals($value, $result[$key]);
74 $this->subject->put($key, $value);
76 $this->expectException(ElementAlreadyExistsException::class);
77 $this->expectExceptionMessage(
"Element $key can not be overwritten.");
79 $this->subject->put($key, $value);
88 $this->subject->put($key, $value);
89 $result = $this->subject->get($key);
91 $this->assertSame($value, $result);
99 $this->expectException(NoSuchElementException::class);
100 $this->expectExceptionMessage(
"No meta data associated with key \"$key\".");
101 $this->subject->get($key);
Class EntryLockingStringMapTest.
testPutValueWhichShouldSucceed()
EntryLockingStringMap $subject
testGetWithoutPutTheValueWhichShouldFail()
testPutValueTwiceWhichShouldFail()
testGetWhichShouldSucceed()
Class EntryLockingStringMap.
Class ElementAlreadyExistsException.
Class MetadataNotFoundException.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...