type = new MediaType(); } #[\PHPUnit\Framework\Attributes\Group('module')] public function testDefault() : void { self::assertEquals(0, $this->type->id); self::assertEquals('', $this->type->name); } #[\PHPUnit\Framework\Attributes\Group('module')] public function testL11nInputOutput() : void { $this->type->setL11n('Test1'); self::assertEquals('Test1', $this->type->getL11n()); $this->type->setL11n(new BaseStringL11n('Test2')); self::assertEquals('Test2', $this->type->getL11n()); } #[\PHPUnit\Framework\Attributes\Group('module')] public function testSerialize() : void { $this->type->name = 'Name'; $serialized = $this->type->jsonSerialize(); unset($serialized['title']); self::assertEquals( [ 'id' => 0, 'name' => 'Name', ], $serialized ); } }