Test looping over metadata
This commit is contained in:
@@ -60,5 +60,18 @@ final class MetadataTest extends TestCase
|
||||
$result = $this->metadata->isSet('missing');
|
||||
$this->assertFalse($result);
|
||||
}
|
||||
|
||||
public function testLoopOverMetadata(): void
|
||||
{
|
||||
$this->metadata->set("a", "A")->set("b", "B")->set("c", "C");
|
||||
|
||||
$result = [];
|
||||
|
||||
foreach ($this->metadata as $key => $value) {
|
||||
$result[$key] = $value;
|
||||
}
|
||||
|
||||
$this->assertSame(["a" => "A", "b" => "B", "c" => "C"], $result);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user